Skip to content

Commit 57d3bd6

Browse files
authored
Parrot: Fix test cases (#3425)
* Test would spuriously fail when emulating statx with stat due to loss of precision in times. Fix test by using fixed formmatting strings. * Fix mistake -- parrot refers to a function in parrot-test.sh Don't use parrot_run executable directly. * Fix test to compare actual and expected output of command. Prior example was failing in a strange way on /bin/dash.
1 parent 83f5852 commit 57d3bd6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

parrot/test/TR_parrot_execve.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ prepare()
1616
{
1717
chirp_start local
1818
cp ${exe} ${root}/hello
19+
${root}/hello > expected.txt
1920

2021
echo "$hostport" > config.txt
2122

@@ -29,7 +30,7 @@ run()
2930

3031
parrot --no-chirp-catalog --timeout=5 --work-dir="/chirp/${hostport}/" ./hello > output.txt
3132

32-
if [ "$(cat output.txt)" == "Hello, world!" ]
33+
if diff output.txt expected.txt
3334
then
3435
return 0
3536
else

parrot/test/TR_parrot_stat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ run()
2727
set -e
2828

2929
stat --format "$FORMAT" $file $link 2>/dev/null > $expected
30-
parrot_run -- stat --format "$FORMAT" $file $link > $from_parrot
30+
parrot -- stat --format "$FORMAT" $file $link > $from_parrot
3131

3232
diff $expected $from_parrot
3333

0 commit comments

Comments
 (0)