]>
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];
17 retval
= asprintf(&cmd
, "ditto \"%s\" \"%s\"", src
, src_dst
);
18 VERIFY(retval
> 0, "asprintf failed");
21 VERIFY(retval
== 0, "ditto command failed");
25 return PERFINDEX_SUCCESS
;
36 retval
= asprintf(&cmd
, "make -C \"%s\" MAKEJOBS=-j%d", src_dst
, num_threads
);
37 VERIFY(retval
> 0, "asprintf failed");
40 VERIFY(retval
== 0, "make command failed");
42 return PERFINDEX_SUCCESS
;
49 retval
= asprintf(&cmd
, "rm -rf \"%s\"", src_dst
);
50 VERIFY(retval
> 0, "asprintf failed");
53 VERIFY(retval
== 0, "rm command failed");
55 return PERFINDEX_SUCCESS
;