Skip to content

Commit

Permalink
Fix unittest benchmark (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
smarr authored Jul 26, 2023
2 parents 79f33c8 + 0d98eaa commit 80158fb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,12 @@ jobs:
run: |
cd som-vm
${{ matrix.som }} -cp ../Smalltalk:../TestSuite:../SomSom/src/compiler:../SomSom/src/interpreter:../SomSom/src/primitives:../SomSom/src/vm:../SomSom/src/vmobjects ../SomSom/tests/SomSomTests.som
- name: Test Unit Test Benchmark
if: ${{ matrix.repo == 'som-java.git' }}
run: |
cd Examples/Benchmarks/TestSuite
./duplicate-tests.sh
cd ../../../som-vm
${{ matrix.som }} -cp ../Smalltalk:../Examples/Benchmarks/TestSuite ../Examples/Benchmarks/BenchmarkHarness.som --gc TestGC100 1 1
${{ matrix.som }} -cp ../Smalltalk:../Examples/Benchmarks/TestSuite ../Examples/Benchmarks/BenchmarkHarness.som Test100 1 1
17 changes: 14 additions & 3 deletions Examples/Benchmarks/TestSuite/duplicate-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/bin/sh
#!/bin/bash
UNAME="$(uname -s)"

echo "Currently, we can only do up to 10 classes, because otherwise, we have too many literals in a single method"
for i in $(seq 1 100)
do
echo $i
if [ $(($i % 20)) -eq "0" ]
then
echo ". $i"
else
echo -n "."
fi

TESTS=("Array" "Block" "Boolean" "ClassLoading" "ClassStructure" "Closure" "Coercion"
"CompilerReturn" "Dictionary" "DoesNotUnderstand" "Double" "Empty" "Global"
Expand All @@ -13,7 +20,11 @@ do
for name in ${TESTS[@]}
do
cp "${name}Test.som" "${name}${i}Test.som"
sed -i '' "s/${name}Test =/${name}${i}Test =/g" "${name}${i}Test.som"
if [ "${UNAME}" = "Darwin" ]; then
sed -i '' "s/${name}Test =/${name}${i}Test =/g" "${name}${i}Test.som"
else
sed -i'' "s/${name}Test =/${name}${i}Test =/g" "${name}${i}Test.som"
fi
done

# Create TestGC${i}.som
Expand Down

0 comments on commit 80158fb

Please sign in to comment.