summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-09-17 13:33:01 +0000
committerTavian Barnes <tavianator@gmail.com>2009-09-17 13:33:01 +0000
commita9f27bf33c6b6b6e9aac0eb1e69743120a11daa1 (patch)
tree1e7eb726bcde1df562fb77e4e53d1e6d5a0845de /tests
parent66084b816dd25a41f774240328a31d57efd276e4 (diff)
downloadlibsandglass-a9f27bf33c6b6b6e9aac0eb1e69743120a11daa1.tar.xz
Rename test.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/introspective-system.c (renamed from tests/simple.c)9
2 files changed, 5 insertions, 10 deletions
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;
}