From 8ab2bfd9bc0c64631e215e4096f94bad007a15b9 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Wed, 12 Jun 2024 21:10:42 +0200 Subject: [PATCH] test - running tests with timing also needs to be configured with v8-flags. This follows #9749 fix --- tests/run-tests.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 3edcb1a5991..f22a043186d 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -23,7 +23,7 @@ export QUARTO_BIN_PATH=$DENO_DIR export QUARTO_SHARE_PATH="`cd "$QUARTO_ROOT/src/resources/";pwd`" export QUARTO_DEBUG=true -QUARTO_DENO_OPTIONS="--config test-conf.json --v8-flags=--enable-experimental-regexp-engine,--max-old-space-size=8192,--max-heap-size=8192 --unstable-ffi --allow-read --allow-write --allow-run --allow-env --allow-net --check" +QUARTO_DENO_OPTIONS="--config test-conf.json --v8-flags=--enable-experimental-regexp-engine,--max-old-space-size=8192,--max-heap-size=8192 --unstable-ffi --allow-read --allow-write --allow-run --allow-env --allow-net" if [[ -z $GITHUB_ACTION ]] && [[ -z $QUARTO_TESTS_NO_CONFIG ]] @@ -53,7 +53,6 @@ if [ "$QUARTO_TEST_TIMING" != "" ] && [ "$QUARTO_TEST_TIMING" != "false" ]; then QUARTO_TEST_TIMING="timing.txt" fi echo "> Running tests with timing and writing to ${QUARTO_TEST_TIMING}" - QUARTO_DENO_OPTIONS="--config test-conf.json --unstable-ffi --allow-read --allow-write --allow-run --allow-env --allow-net --no-check" rm -f $QUARTO_TEST_TIMING FILES=$@ if [ "$FILES" == "" ]; then @@ -70,13 +69,13 @@ if [ "$QUARTO_TEST_TIMING" != "" ] && [ "$QUARTO_TEST_TIMING" != "false" ]; then SMOKE_ALL_FILES=`find docs/smoke-all/ -type f -regextype "posix-extended" -regex ".*/[^_][^/]*[.]qmd" -o -regex ".*/[^_][^/]*[.]md" -o -regex ".*/[^_][^/]*[.]ipynb"` for j in $SMOKE_ALL_FILES; do echo "${SMOKE_ALL_TEST_FILE} -- ${j}" >> "$QUARTO_TEST_TIMING" - /usr/bin/time -f " %e real %U user %S sys" -a -o ${QUARTO_TEST_TIMING} "${DENO_DIR}/tools/${DENO_ARCH_DIR}/deno" test ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" ${SMOKE_ALL_TEST_FILE} -- ${j} + /usr/bin/time -f " %e real %U user %S sys" -a -o ${QUARTO_TEST_TIMING} "${DENO_DIR}/tools/${DENO_ARCH_DIR}/deno" test ${QUARTO_DENO_OPTIONS} --no-check ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" ${SMOKE_ALL_TEST_FILE} -- ${j} done continue fi # Otherwise we time the individual test.ts test echo $i >> "$QUARTO_TEST_TIMING" - /usr/bin/time -f " %e real %U user %S sys" -a -o "$QUARTO_TEST_TIMING" "${DENO_DIR}/tools/${DENO_ARCH_DIR}/deno" test ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" $i + /usr/bin/time -f " %e real %U user %S sys" -a -o "$QUARTO_TEST_TIMING" "${DENO_DIR}/tools/${DENO_ARCH_DIR}/deno" test ${QUARTO_DENO_OPTIONS} --no-check ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" $i done # exit the script with an error code if the timing file shows error grep -q 'Command exited with non-zero status' $QUARTO_TEST_TIMING && SUCCESS=1 || SUCCESS=0 @@ -119,7 +118,7 @@ else TESTS_TO_RUN="${SMOKE_ALL_TEST_FILE} -- ${SMOKE_ALL_FILES}" fi fi - "${DENO_DIR}/tools/${DENO_ARCH_DIR}/deno" test ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" $TESTS_TO_RUN + "${DENO_DIR}/tools/${DENO_ARCH_DIR}/deno" test ${QUARTO_DENO_OPTIONS} --check ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" $TESTS_TO_RUN SUCCESS=$? fi