]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
for test programs, assume interactive mode unless "__test" is given
authorAntti Kantee <pooka@iki.fi>
Wed, 6 May 2015 10:05:21 +0000 (10:05 +0000)
committerAntti Kantee <pooka@iki.fi>
Wed, 6 May 2015 10:05:21 +0000 (10:05 +0000)
lib/librumprun_tester/rumprun_tester.c
tests/runtests.sh

index 7c73d55119f0eabef8fffa53b1d0a48ecd811ee4..f487b93a06762b11c7605ceb89ae06c4d5166fa3 100644 (file)
@@ -71,6 +71,10 @@ main(int argc, char *argv[])
 {
        unsigned int i;
 
+       /* were we ran via the test framework? */
+       if (argc < 2 || strcmp(argv[1], "__test") != 0)
+               return rumprun_test(argc, argv);
+
        /*
         * XXX: need a better way to determine disk device!
         * e.g. rumpconfig (which has currently not been
@@ -101,7 +105,7 @@ main(int argc, char *argv[])
         */
        printf("=== FOE RUMPRUN 12345 TES-TER 54321 ===\n");
        atexit(logexit);
-       logrv = rumprun_test(argc, argv);
+       logrv = rumprun_test(argc+1, argv-1);
        printf("=== RUMPRUN 12345 TES-TER 54321 EOF ===\n");
 
        exit(logrv);
index b1074513100da9cb3e09e4e5bfe7aec1a40b6461..0bfe3558352f2be8127522d28c9fbb4f69449229 100755 (executable)
@@ -66,7 +66,7 @@ runguest ()
        # img2=$3
 
        [ -n "${img1}" ] || die runtest without a disk image
-       cookie=$(${RUMPRUN} ${STACK} ${OPT_SUDO} -b ${img1} ${testprog})
+       cookie=$(${RUMPRUN} ${STACK} ${OPT_SUDO} -b ${img1} ${testprog} __test)
        if [ $? -ne 0 -o -z "${cookie}" ]; then
                TEST_RESULT=ERROR
                TEST_ECODE=-2