[gnome-js-common] Tests: Integrate tests into 'make check'.
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-js-common] Tests: Integrate tests into 'make check'.
- Date: Wed, 27 May 2009 04:29:31 -0400 (EDT)
commit 43802c55c3a58935270c26835a7ac02f204e105c
Author: Tim Horton <hortont424 gmail com>
Date: Wed May 27 04:28:41 2009 -0400
Tests: Integrate tests into 'make check'.
---
configure.ac | 3 ++-
po/POTFILES.in | 1 -
tests/Makefile.am | 14 ++++++++++++++
tests/run-tests-seed.c | 6 +++++-
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 38f85ab..923f08a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
-
+AM_PROG_CC_C_O
@@ -53,6 +53,7 @@ Makefile
po/Makefile.in
modules/Makefile
modules/tweener/Makefile
+tests/Makefile
gnome-js-common.pc
])
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a0b3c55..81b7d99 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,2 @@
# List of source files containing translatable strings.
-src/main.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..28af374
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,14 @@
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS = run-tests-seed
+
+run_tests_seed_SOURCES = run-tests-seed.c
+
+run_tests_seed_CFLAGS = \
+ -Wall \
+ $(SEED_CFLAGS)
+
+run_tests_seed_LDFLAGS = \
+ $(SEED_LIBS)
+
+TESTS = run-tests-seed
diff --git a/tests/run-tests-seed.c b/tests/run-tests-seed.c
index b51ffa4..e96c0ef 100644
--- a/tests/run-tests-seed.c
+++ b/tests/run-tests-seed.c
@@ -8,6 +8,7 @@
#include <stdio.h>
SeedEngine * eng;
+gboolean failure_flag = FALSE;
SeedValue js_assert(SeedContext ctx,
SeedObject function,
@@ -56,6 +57,9 @@ gboolean test_exec(gchar * filename)
filename,
seed_exception_get_name(eng->context, e),
seed_exception_get_line(eng->context, e));
+
+ failure_flag = TRUE;
+
return FALSE;
}
@@ -98,6 +102,6 @@ int main(int argc, char ** argv)
run_tests(argv[i]);
}
- return 0;
+ return failure_flag;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]