From c38082508f74109fe93e373c1d98b1019b88bbc1 Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Mon, 23 Jun 2014 22:08:42 -0700 Subject: [PATCH] zdtm: test skip() Change-Id: I7d8f3669a98da666664cffc90f3be02a120e18db --- test/zdtm.sh | 1 + test/zdtm/live/static/Makefile | 1 + test/zdtm/live/static/skiptest.c | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 test/zdtm/live/static/skiptest.c diff --git a/test/zdtm.sh b/test/zdtm.sh index 3f3651af7440..f0925b21b876 100755 --- a/test/zdtm.sh +++ b/test/zdtm.sh @@ -96,6 +96,7 @@ static/stopped static/chroot static/chroot-file transition/maps007 +static/skiptest " # Duplicate list with ns/ prefix TEST_LIST=$TEST_LIST$(echo $TEST_LIST | tr ' ' '\n' | sed 's#^#ns/#') diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile index f6238335c8a1..13da74eb60f0 100644 --- a/test/zdtm/live/static/Makefile +++ b/test/zdtm/live/static/Makefile @@ -105,6 +105,7 @@ TST_NOFILE = \ tun \ stopped \ rtc \ + skiptest \ # jobctl00 \ TST_FILE = \ diff --git a/test/zdtm/live/static/skiptest.c b/test/zdtm/live/static/skiptest.c new file mode 100644 index 000000000000..fdac123576ef --- /dev/null +++ b/test/zdtm/live/static/skiptest.c @@ -0,0 +1,21 @@ +#include +#include +#include + +#include "zdtmtst.h" + +int main(int argc, char ** argv) +{ + test_init(argc, argv); + + if (getenv("SKIP_TEST")) { + skip("I would like to skip this test."); + exit(0); + } + + test_daemon(); + test_waitsig(); + + pass(); + return 0; +} -- 2.0.0.526.g5318336