Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jarulraj committed Jan 23, 2023
1 parent 49b7365 commit 4e179fa
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions script/test/test_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ if [ -f ./__init__.py ]; then
mv ./__init__.py ./__init__.py.bak
fi

# Run black, isort, linter
sh script/formatting/pre-push.sh
return_code=$?
if [ $return_code -ne 0 ];
then
exit $return_code
fi

git log | head

# Run only benchmark tests
if [ -e ".benchmarks" ];
then
echo "SUBSEQUENT RUN"
# SUBSEQUENT RUNS
PYTHONPATH=./ pytest test/ --benchmark-autosave --benchmark-compare -v --benchmark-compare-fail=min:10% ${1:-} -m "benchmark"
PYTHONPATH=./ pytest test/ --benchmark-autosave --benchmark-compare --benchmark-columns="mean" --benchmark-group-by="name" -v --benchmark-compare-fail=min:10% ${1:-} -m "benchmark"
test_code=$?
if [ $test_code -ne 0 ];
then
Expand All @@ -31,14 +23,23 @@ then
else
echo "FIRST RUN"
# FIRST RUN FOR REFERENCE
PYTHONPATH=./ pytest test/ --benchmark-autosave -v ${1:-} -m "benchmark"
PYTHONPATH=./ pytest test/ --benchmark-autosave --benchmark-columns="mean" -v ${1:-} -m "benchmark"
test_code=$?
if [ $test_code -ne 0 ];
then
exit $test_code
fi
fi

# Check demo page
curl https://ada-00.cc.gatech.edu/eva/playground
demo_code=$?
if [ $demo_code -ne 0 ];
then
echo "Demo down!"
exit $demo_code
fi

# restore __init__.py if it exists
if [ -f ./__init__.py.bak ]; then
mv ./__init__.py.bak ./__init__.py
Expand Down

0 comments on commit 4e179fa

Please sign in to comment.