[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: meaning autotest exit code 13
From: |
djien |
Subject: |
Re: meaning autotest exit code 13 |
Date: |
Thu, 7 Mar 2013 05:04:11 -0800 (PST) |
Thank you Eric for the explanation. Let me explain what i have done:
step 1: the hello.c code
include <stdio.h>
main( int argc, char *argv[] )
{
printf( "Hello, world\n" );
}
step2: compile gcc hello.c -o hello
step3: t17.at
# Process with autom4te to create an -*- Autotest -*- test suite.
m4_define([AT_PACKAGE_STRING], [GNU Programming])
m4_define([AT_PACKAGE_BUGREPORT], address@hidden)
# AT_PACKAGE_STRING([Hello],[v.1.0])
# AT_PACKAGE_BUGREPORT(address@hidden)
AT_INIT([hello])
AT_SETUP([hello])
AT_TESTED([hello])
AT_CHECK([hello],[],[[Hello, world
]])
AT_CLEANUP()
step 4: execute hello
$ ./hello
Hello, world
$
step 5:
autom4te -l autotest t17.at -o t17_hello
step 6: t17_hello script
update PATH with the current working dir
## ------------- ##
## Actual tests. ##
## ------------- ##
#AT_START_1
..
{ set +x
$as_echo "$at_srcdir/t17.at:11: hello"
at_fn_check_prepare_trace "t17.at:11"
( $at_check_trace; hello
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "Hello, world
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/t17.at:11"
$at_failed && at_fn_log_failure
$at_traceon; }
..
#AT_STOP_1
step 7: $ ./t17_hello -x -v
step 8: t17_hello.log
# -*- compilation -*-
1. t17.at:9: testing hello ...
++ set +x
/t17.at:11: hello
++ hello
/t17.at:11: exit code was 13, expected 0
1. t17.at:9: 1. hello (t17.at:9): FAILED (t17.at:11)
step 9: modift t17.at
AT_CHECK([hello],[],[["Hello, world
"]])
step 10: and do the same steps as above:
t17_hello script:
echo >>"$at_stdout"; $as_echo "\"Hello, world
\"" | \
step 10: t17_hello.log
1. t18.at:9: testing hello ...
++ set +x
/t18.at:11: hello
++ hello
--- - 2013-03-07 14:01:44.798854464 +0100
+++
/media/wd40/TODOs/work/work_20130306/autotest/trial2b/t18_hello.dir/at-groups/1/stdout2013-03-07
14:01:44.791793357 +0100
@@ -1,2 +1,2 @@
-"Hello, world
-"
+Hello, world
+
/t18.at:11: exit code was 13, expected 0
1. t18.at:9: FAILED (t18.at:11)
Please inform me where the error is.
Thank you
--
View this message in context:
http://gnu-autoconf.7623.n7.nabble.com/meaning-autotest-exit-code-13-tp18573p18576.html
Sent from the Gnu - Autoconf - General mailing list archive at Nabble.com.