Skip to content

Commit

Permalink
update test Script
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinlong-Wu committed Dec 20, 2023
1 parent 51dd550 commit 80ab57f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/jit-riscv64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
ROOTFS_DIR: /crossrootfs/riscv64
QEMU_LD_PREFIX: /crossrootfs/riscv64
CORE_ROOT: /__w/runtime/runtime/artifacts/tests/coreclr/linux.riscv64.Debug/Tests/Core_Root
# set timeout to 5 minutes
__TestTimeout: ${{5*60*1000}}}
needs: cross-build
steps:
- name: Checkout
Expand All @@ -69,7 +71,7 @@ jobs:
run: ./build.sh -mono -Debug riscv64 -tree:JIT/ --ci
working-directory: ./src/tests
- name: Run tests
run: bash -c ./run.sh Debug
run: /crossrootfs/riscv64/bin/qemu-riscv64-static /crossrootfs/riscv64/bin/bash -c ./run.sh Debug --test-env=/home/wuxinlong/workspace/runtime/src/tests/setTestEnv.sh
working-directory: ./src/tests
- name: Upload Test error Log
if: ${{ failure() }}
Expand Down
11 changes: 7 additions & 4 deletions src/tests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ def run_tests(args,
test_env_script_path : Path to script to use to set the test environment, if any.
"""

# Set default per-test timeout to 30 minutes (in milliseconds).
per_test_timeout = 30*60*1000
# Set default per-test timeout to 5 minutes (in milliseconds).
per_test_timeout = 5*60*1000

# Setup the environment
if args.long_gc:
Expand Down Expand Up @@ -862,8 +862,11 @@ def run_tests(args,

# Set __TestTimeout environment variable, which is the per-test timeout in milliseconds.
# This is read by the test wrapper invoker, in src\tests\Common\Coreclr.TestWrapper\CoreclrTestWrapperLib.cs.
print("Setting __TestTimeout=%s" % str(per_test_timeout))
os.environ["__TestTimeout"] = str(per_test_timeout)
if "__TestTimeout" in os.environ:
print("__TestTimeout already set in environment to %s" % os.environ["__TestTimeout"])
else:
print("Setting __TestTimeout=%s" % str(per_test_timeout))
os.environ["__TestTimeout"] = str(per_test_timeout)

# Set CORE_ROOT
print("Setting CORE_ROOT=%s" % args.core_root)
Expand Down

0 comments on commit 80ab57f

Please sign in to comment.