opkg: add libopkg test application
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:09:52 +0000 (05:09 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:09:52 +0000 (05:09 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@73 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

tests/Makefile.am
tests/libopkg_test.c [new file with mode: 0644]

index fe67e99..a11af3c 100644 (file)
@@ -1,12 +1,17 @@
 
-noinst_PROGRAMS = opkg_hash_test opkg_extract_test
+#noinst_PROGRAMS = opkg_hash_test opkg_extract_test
+noinst_PROGRAMS = libopkg_test
 
-opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
-opkg_hash_test_SOURCES = opkg_hash_test.c
-opkg_hash_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
+#opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
+#opkg_hash_test_SOURCES = opkg_hash_test.c
+#opkg_hash_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
 
-opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
-opkg_extract_test_SOURCES = opkg_extract_test.c
-opkg_extract_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
+#opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
+#opkg_extract_test_SOURCES = opkg_extract_test.c
+#opkg_extract_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
+
+libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.la
+libopkg_test_SOURCE = libopkg_test.c
+libopkg_test_CFLAGS = $(ALL_CFLAGS)
 
 
diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c
new file mode 100644 (file)
index 0000000..b834a7f
--- /dev/null
@@ -0,0 +1,15 @@
+#include <opkg.h>
+
+
+int
+main (int argc, char **argv)
+{
+  opkg_t *opkg;
+  
+  opkg = opkg_new ();
+
+  opkg_set_option (opkg, "offline_root", "/tmp/");
+
+
+  opkg_free (opkg);
+}