From a812f0b58edd2f74edbdd03e07006dccf3d535d6 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 30 Mar 2018 10:34:07 +0100 Subject: add test Makefile target --- Makefile | 2 ++ ioriot/Makefile | 2 ++ ioriot/src/main.c | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d5ab493..7e7099d 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,5 @@ loc: wc -l ./systemtap/src/*.stp ./ioriot/src/*.{h,c} ./ioriot/src/*/*.{h,c} | tail -n 1 doxygen: doxygen ./docs/doxygen.conf +test: + $(MAKE) -C ioriot test diff --git a/ioriot/Makefile b/ioriot/Makefile index d933d72..24b6fcf 100644 --- a/ioriot/Makefile +++ b/ioriot/Makefile @@ -34,3 +34,5 @@ todo: fgrep ../TODO ./src/* ctags: ctags ./src/*.{h,c} ./src/*/*.{h,c} +test: clean all + ./ioriot -U diff --git a/ioriot/src/main.c b/ioriot/src/main.c index d2db700..d7c6204 100644 --- a/ioriot/src/main.c +++ b/ioriot/src/main.c @@ -74,6 +74,7 @@ static void _print_synopsis(void) Put("\tioriot -d"); Put("\tioriot -P"); Put("\tioriot -T [-n NAME]"); + Put("\tioriot -U"); Put("\tioriot -V"); } @@ -99,6 +100,7 @@ static void _print_help(void) Put("\t-R REPLAYFILE Init and replay in one run (-i and -r combined)"); Put("\t-S STATSFILE Write a stats file at the end of a test"); Put("\t-T Trash data directories"); + Put("\t-U Run I/O Riot's unit tests"); Put("\t-P Purge all trash directories of all tests)"); Put("\t-V Print I/O Riot program version"); Put("\t-w WD_BASE The working directory's base path"); @@ -109,7 +111,7 @@ static void _print_help(void) Put("\t 1.) sudo ioriot -c io.capture"); Put("\t 2.) sudo ioriot -r io.replay -c io.capture -u paul -n test1"); Put("\t 3.) sudo ioriot -i io.replay"); - Put("\t 4.) sudo ioriot -r io.replay -S"); + Put("\t 4.) sudo ioriot -r io.replay -S stats.txt"); } /** -- cgit v1.2.3