Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-02-13 14:14:29 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-02-13 14:14:29 +0300
commit7a159a70027e93b1e1fcca61bb57a6008c429b72 (patch)
tree7b9d02c5141ffcec51162bbb7215298f455ffa77
parentc989d7e21cac3bf0495a1003d1f8160f3312af3a (diff)
Add running a single test
-rwxr-xr-xrun_mrt.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/run_mrt.sh b/run_mrt.sh
index e9d154a..c9247bd 100755
--- a/run_mrt.sh
+++ b/run_mrt.sh
@@ -52,11 +52,19 @@ count_skipped=0
count_failed=0
count_all=0
+test_dirs=$(find $prefix -type d | grep -v "/_")
+
+if grep -q "/test_.*\.sh\$" <<< "$prefix"; then
+ test_one_file=$(basename $prefix)
+ test_dirs=$(dirname $prefix)
+fi
+
+
time_start=$(date +%s.%N)
# Traverse test directories
cd $MRT_ROOT
-for test_dir in $(find $prefix -type d | grep -v "/_")
+for test_dir in $test_dirs
do
log "Checking directory: $test_dir"
nosetup=false
@@ -80,6 +88,9 @@ do
# Run tests
for test_path in $(ls -A $test_dir/test_*.sh 2>/dev/null)
do
+ if [[ -n "$test_one_file" && $test_path != *"$test_one_file"* ]]; then
+ continue
+ fi
test_time_start=$(date +%s.%N)
((++count_all))