2 #include "perf_index.h"
5 static const char *src_dst
= "/tmp/perf_index_compile_code";
6 static const char *src_root
= "/Network/Servers/xs1/release/Software/Zin/Projects/xnu/xnu-2050.7.9";
8 const stress_test_t compile_test
= {"compile", &compile_init
, &compile
, &compile_cleanup
, &no_validate
};
10 DECL_INIT(compile_init
) {
12 const char *src
= src_root
;
15 assert(asprintf(&cmd
, "ditto \"%s\" \"%s\"", src
, src_dst
) >= 0);
16 assert(system(cmd
) == 0);
20 DECL_CLEANUP(compile_cleanup
) {
22 assert(asprintf(&cmd
, "rm -rf \"%s\"", src_dst
) >= 0);
23 assert(system(cmd
) == 0);
30 assert(asprintf(&cmd
, "make -C \"%s\" MAKEJOBS=-j%d", src_dst
, num_threads
) >= 0);
31 assert(system(cmd
) == 0);