Skip to content

Commit

Permalink
Fix duplicate-tests.sh
Browse files Browse the repository at this point in the history
- need bash, otherwise it breaks
- make progress output more compact
- work around incompatibility of sed -i on macos and Linux
  • Loading branch information
smarr committed Jul 26, 2023
1 parent 8f19e52 commit afd9c33
Showing 1 changed file with 14 additions and 3 deletions.
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 afd9c33

Please sign in to comment.