diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rw-r--r-- | tests/introspective-system.c (renamed from tests/simple.c) | 9 |
3 files changed, 8 insertions, 10 deletions
@@ -13,6 +13,9 @@ Makefile Makefile.in +# Test executables +/tests/*-test + # Files and folders created by libtool .libs/ *.l[oa] diff --git a/tests/Makefile.am b/tests/Makefile.am index b42882e..ee8a2f1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,10 +17,10 @@ ## along with this program. If not, see <http://www.gnu.org/licenses/>. ## ########################################################################### -check_PROGRAMS = simple-test +check_PROGRAMS = introspective-system-test TESTS = $(check_PROGRAMS) INCLUDES = -I../src -simple_test_SOURCES = simple.c -simple_test_LDADD = ../src/libsandglass.la +introspective_system_test_SOURCES = introspective-system.c +introspective_system_test_LDADD = ../src/libsandglass.la diff --git a/tests/simple.c b/tests/introspective-system.c index 85dacb6..8366623 100644 --- a/tests/simple.c +++ b/tests/introspective-system.c @@ -28,11 +28,10 @@ int main() { sandglass_t sandglass; - sandglass_attributes_t min = { SANDGLASS_MONOTONIC, SANDGLASS_SYSTEM }, - max = { SANDGLASS_MONOTONIC, SANDGLASS_CPUTIME }; + sandglass_attributes_t attr = { SANDGLASS_INTROSPECTIVE, SANDGLASS_SYSTEM }; struct timespec tosleep = { .tv_sec = 0, .tv_nsec = 100000000 }; - if (sandglass_create(&sandglass, &min, &max) != 0) { + if (sandglass_create(&sandglass, &attr, &attr) != 0) { perror("sandglass_create()"); return EXIT_FAILURE; } @@ -47,9 +46,5 @@ main() return EXIT_FAILURE; } - printf("0.1 seconds timed by sandglass as %ld grains; %g s\n", - sandglass.grains, - sandglass.grains/sandglass.resolution); - return EXIT_SUCCESS; } |