diff --git a/IntegrationTests/tests_04_performance/test_01_resources/run-nio-alloc-counter-tests.sh b/IntegrationTests/tests_04_performance/test_01_resources/run-nio-alloc-counter-tests.sh index 7ca1f7b8c..ae08f97de 100755 --- a/IntegrationTests/tests_04_performance/test_01_resources/run-nio-alloc-counter-tests.sh +++ b/IntegrationTests/tests_04_performance/test_01_resources/run-nio-alloc-counter-tests.sh @@ -18,25 +18,28 @@ here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" tmp_dir="/tmp" -function die() { - echo >&2 "ERROR: $*" - exit 1 -} - while getopts "t:" opt; do case "$opt" in t) tmp_dir="$OPTARG" ;; - \?) - die "unknown option $opt" + *) + exit 1 ;; esac done +shift $((OPTIND-1)) + +tests_to_run=("$here"/test_*.swift) + +if [[ $# -gt 0 ]]; then + tests_to_run=$@ +fi + "$here/../../allocation-counter-tests-framework/run-allocation-counter.sh" \ -p "$here/../../.." \ -m NIO -m NIOHTTP1 -m NIOWebSocket \ -s "$here/shared.swift" \ -t "$tmp_dir" \ - "$here"/test_*.swift + "${tests_to_run[@]}"