unit-test: Link 29 test programs into ovstest
[sliver-openvswitch.git] / tests / test-packets.c
index e60e463..a9fafd5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Nicira, Inc.
+ * Copyright (c) 2011, 2014 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "ovstest.h"
 
 #undef NDEBUG
 #include <assert.h>
@@ -152,13 +153,13 @@ test_ipv6_masking(void)
     assert(ipv6_count_cidr_bits(&dest) == 128);
 }
 
-int
-main(void)
+static void
+test_packets_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
 {
     test_ipv4_cidr();
     test_ipv6_static_masks();
     test_ipv6_cidr();
     test_ipv6_masking();
-
-    return 0;
 }
+
+OVSTEST_REGISTER("test-packets", test_packets_main);