Hi Guys,
I have just started looking into LTP and how test automation can be achieved
using the platform. While going through the very basics I am stuck on shell
script writing for LTP. I was following
https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines#231-basic-shell-test-structure
and the very first thing that I got hit by was:
Set variables TCID, TST_TOTAL, and TST_COUNT before each test:
export TCID=<test name>
export TST_TOTAL=<Total Number of Tests >
export TST_COUNT=<Test case number>
so I exported the variables in the above mentioned shell script (is the current
wiki wrong???), the test passed as it should and I thought I was done and I
understand, but then when I tried to make the test fail by doing the following:
true
ret=$?
replaced with
false
ret=$?
the test still reports success :(
tst_exit says:
"Exits the tests, note that this function has no parameters, the PASSES/FAILS
reported by the tst_resm() interfaces were stored and are used for the exit
value."
If I explicitly write an 'exit 1' at the end of the testcase, it fails but I
believe that shouldn't be the case (using an explicit return shouldn't be
needed if tst_exit is being used)... What am I missing? (a brain perhaps... :S)
BR,
Awais
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list