summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMichael Brown2012-02-27 15:18:59 +0100
committerMichael Brown2012-02-27 15:21:54 +0100
commitc0340d9762e0ba05f4b46d7b8264a3f1c070cefd (patch)
tree2f1a5f53eb9ebc23666fe27b2545f9c88e202285 /src/tests
parent[crypto] Use ANS X9.82 Approved get_random_nz() for RSA (diff)
downloadipxe-c0340d9762e0ba05f4b46d7b8264a3f1c070cefd.tar.gz
ipxe-c0340d9762e0ba05f4b46d7b8264a3f1c070cefd.tar.xz
ipxe-c0340d9762e0ba05f4b46d7b8264a3f1c070cefd.zip
[test] Allow self-tests to be run individually
Separate out the list of self-tests from the self-test infrastructure. This allows tests to be run individually. For example: make bin/sha1_test.iso Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test.c6
-rw-r--r--src/tests/tests.c31
2 files changed, 31 insertions, 6 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index 7e869053b..fa9f57971 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -137,9 +137,3 @@ static void test_init ( void ) {
struct init_fn test_init_fn __init_fn ( INIT_NORMAL ) = {
.initialise = test_init,
};
-
-/* Drag in all applicable self-tests */
-REQUIRE_OBJECT ( list_test );
-REQUIRE_OBJECT ( sha1_test );
-REQUIRE_OBJECT ( hmac_drbg_test );
-REQUIRE_OBJECT ( hash_df_test );
diff --git a/src/tests/tests.c b/src/tests/tests.c
new file mode 100644
index 000000000..870d467e9
--- /dev/null
+++ b/src/tests/tests.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+/** @file
+ *
+ * Self-test collection
+ *
+ */
+
+/* Drag in all applicable self-tests */
+REQUIRE_OBJECT ( list_test );
+REQUIRE_OBJECT ( sha1_test );
+REQUIRE_OBJECT ( hmac_drbg_test );
+REQUIRE_OBJECT ( hash_df_test );