Skip to content

Commit 5f48a8a

Browse files
authored
Properly handle multiple plans in GITHUB-CI in CI scripts (#1301)
The PR fixes an issue in our CI script. We sometimes want to run a test with multiple plans, such as `GITHUB-CI: MMTK_PLAN=NoGC,SemiSpace`. The CI script does not parse `MMTK_PLAN`, and It instead just set the entire string as the env var (`MMTK_PLAN=NoGC,SemiSpace`). This results in an invalid value for `MMTK_PLAN`, and the default plan is used.
1 parent 973bd02 commit 5f48a8a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/scripts/ci-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ find ./src ./tests -type f -name "mock_test_*" | while read -r file; do
2222
# Get the required plans.
2323
# Some tests need to be run with multiple plans because
2424
# some bugs can only be reproduced in some plans but not others.
25-
PLANS=$(sed -n 's/^\/\/ *GITHUB-CI: *MMTK_PLAN=//p' $file)
25+
PLANS=$(sed -n 's/^\/\/ *GITHUB-CI: *MMTK_PLAN=//p' $file | tr ',' '\n')
2626
if [[ $PLANS == 'all' ]]; then
2727
PLANS=$ALL_PLANS
2828
elif [[ -z $PLANS ]]; then

src/vm/tests/mock_tests/mock_test_doc_mutator_storage.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// GITHUB-CI: MMTK_PLAN=NoGC,SemiSpace,Immix,GenImmix,StickyImmix
1+
// GITHUB-CI: MMTK_PLAN=NoGC,SemiSpace,GenImmix
2+
// The test assumes the default allocator is a bump pointer allocator, thus only works for plans that use BumpAlloator (not ImmixAllocator or other allocators).
23

34
use super::mock_test_prelude::*;
45

0 commit comments

Comments
 (0)