]>
git.saurik.com Git - apple/xnu.git/blob - tools/tests/perf_index/perfindex-compile.c
1 #include "perf_index.h"
6 static const char *src_dst
= "/tmp/perf_index_compile_code";
7 static const char *src_root
= "/Network/Servers/xs1/release/Software/Zin/Projects/xnu/xnu-2050.7.9";
12 const char *src
= src_root
;
14 src
= (char*)test_argv
[0];
16 retval
= asprintf(&cmd
, "ditto \"%s\" \"%s\"", src
, src_dst
);
17 VERIFY(retval
> 0, "asprintf failed");
20 VERIFY(retval
== 0, "ditto command failed");
24 return PERFINDEX_SUCCESS
;
34 retval
= asprintf(&cmd
, "make -C \"%s\" MAKEJOBS=-j%d", src_dst
, num_threads
);
35 VERIFY(retval
> 0, "asprintf failed");
38 VERIFY(retval
== 0, "make command failed");
40 return PERFINDEX_SUCCESS
;
47 retval
= asprintf(&cmd
, "rm -rf \"%s\"", src_dst
);
48 VERIFY(retval
> 0, "asprintf failed");
51 VERIFY(retval
== 0, "rm command failed");
53 return PERFINDEX_SUCCESS
;