summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-05 16:03:15 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-05 16:03:15 +0200
commit308cc51f5df0341001b1e1b0aa63ab08d2376c0c (patch)
tree13c59a520b8bedcd0d3cb09ca3e7e59e0d99df0a /tests
parent0f9b3bd9b10c8c0beb2688fc4bfd8de07ca2fc4f (diff)
downloadnq-308cc51f5df0341001b1e1b0aa63ab08d2376c0c.tar.gz
nq-308cc51f5df0341001b1e1b0aa63ab08d2376c0c.tar.xz
nq-308cc51f5df0341001b1e1b0aa63ab08d2376c0c.zip
avoid exec hack in fq tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests b/tests
index 322f541..17ce704 100755
--- a/tests
+++ b/tests
@@ -24,6 +24,7 @@ mkdir test.dir
 (
 cd test.dir
 
+printf '# nq tests\n'
 check 'fails with no arguments' ! $NQ
 check 'succeeds enqueuing true' 'f=$($NQ true)'
 check 'generated a lockfile' test -f $f
@@ -37,6 +38,7 @@ mkdir test.dir
 (
 cd test.dir
 
+printf '# queue tests\n'
 check 'enqueing true' f1=$($NQ true)
 check 'enqueing sleep 500' f2=$($NQ sleep 500)
 check 'first job is done already' $NQ -t $f1
@@ -54,6 +56,7 @@ mkdir test.dir
 (
 cd test.dir
 
+printf '# env tests\n'
 check 'enqueing env' f1=$($NQ env)
 $NQ -w
 check 'NQJOBID is set' grep -q NQJOBID=$f1 $f1
@@ -64,6 +67,7 @@ mkdir test.dir
 (
 cd test.dir
 
+printf '# killing tests\n'
 check 'spawning four jobs' 'f1=$($NQ sleep 100)'
 check 'spawning four jobs' 'f2=$($NQ sleep 1)'
 check 'spawning four jobs' 'f3=$($NQ sleep 100)'
@@ -81,17 +85,18 @@ mkdir test.dir
 (
 cd test.dir
 
+printf '# fq tests\n'
 check 'spawning four jobs' 'f1=$($NQ sleep 100)'
 check 'spawning four jobs' 'f2=$($NQ echo two)'
 check 'spawning four jobs' 'f3=$($NQ sleep 300)'
 check 'spawning four jobs' 'f4=$($NQ sleep 400)'
-check 'fq tracks first job' '($FQ & p=$!; sleep 1; kill $p) | sed 3q | grep -q sleep.*100'
+check 'fq tracks first job' '($FQ ,* & p=$!; sleep 1; kill $p) | sed 3q | grep -q sleep.*100'
 check 'killing first job' kill ${f1##*.}
 check 'killing fourth job' kill ${f4##*.}
 sleep 1
-check 'fq tracks third job' '($FQ & p=$!; sleep 1; kill $p) | sed 3q | grep -q sleep.*300'
+check 'fq tracks third job' '($FQ ,* & p=$!; sleep 1; kill $p) | sed 3q | grep -q sleep.*300'
 check 'killing third job' kill ${f3##*.}
-check 'fq outputs last job when no job running' '$FQ | sed 3q | grep -q sleep.*400'
+check 'fq outputs last job when no job running' '$FQ ,* | sed 3q | grep -q sleep.*400'
 )
 
 rm -rf test.dir