From bec6ea00eaae755a97cbaaa50e7e8dad70ad6178 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka <valenok@gmail.com> Date: Tue, 22 Jan 2013 08:59:42 +0000 Subject: [PATCH] Using unit test targets --- test/test.pl | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/test.pl b/test/test.pl index d9e30e62a..1e1841a28 100644 --- a/test/test.pl +++ b/test/test.pl @@ -456,15 +456,8 @@ sub do_PUT_test { } sub do_unit_test { - my $cmd = "cc -g -W -Wall -o $unit_test_exe $root/unit_test.c -I. ". - "-pthread -DNO_SSL "; - if (on_windows()) { - $cmd = "cl $root/embed.c mongoose.c /I. /nologo /DNO_SSL ". - "/DLISTENING_PORT=\\\"$port\\\" /link /out:$embed_exe.exe ws2_32.lib "; - } - print $cmd, "\n"; - system($cmd) == 0 or fail("Cannot compile unit test"); - system($unit_test_exe) == 0 or fail("Unit test failed!"); + my $target = on_windows() ? 'windows_unit_test' : 'unix_unit_test'; + system("make $target") == 0 or fail("Unit test failed!"); } sub do_embedded_test { -- GitLab