xref: /haiku/src/tests/system/benchmarks/compile_bench.sh (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
1#!/bin/sh
2
3testDir=/tmp/compile_bench
4rm -rf $testDir
5mkdir -p $testDir
6cd $testDir
7
8cat << EOF > hello_world.cpp
9#include <stdio.h>
10
11int
12main()
13{
14	printf("Hello world!\n");
15	return 0;
16}
17
18EOF
19
20compile_all()
21{
22	for f in $(seq 100); do
23		echo -n .
24		g++ -o $f ${f}.cpp
25	done
26}
27
28for f in $(seq 100); do
29	cp hello_world.cpp ${f}.cpp
30done
31
32time compile_all
33
34rm -rf $testDir
35