summaryrefslogtreecommitdiffstats
path: root/development/csmith/launchn.diff
diff options
context:
space:
mode:
Diffstat (limited to 'development/csmith/launchn.diff')
-rw-r--r--development/csmith/launchn.diff42
1 files changed, 42 insertions, 0 deletions
diff --git a/development/csmith/launchn.diff b/development/csmith/launchn.diff
new file mode 100644
index 0000000000..e7781b212a
--- /dev/null
+++ b/development/csmith/launchn.diff
@@ -0,0 +1,42 @@
+diff -Naur csmith-csmith-2.3.0/scripts/launchn.pl csmith-csmith-2.3.0.patched/scripts/launchn.pl
+--- csmith-csmith-2.3.0/scripts/launchn.pl 2017-06-21 16:50:24.000000000 -0400
++++ csmith-csmith-2.3.0.patched/scripts/launchn.pl 2023-06-10 17:14:02.157839502 -0400
+@@ -30,32 +30,31 @@
+ ###############################################################################
+
+ # This script illustrates how to run compiler_test.pl in parallel on multi-core machines. Please make sure
+-# these processes are terminated at the end of your testing
++# these processes are terminated at the end of your testing
+
+ #!/usr/bin/perl -w
+ use strict;
+ use warnings;
+-use Sys::CPU;
+
+ sub usage () {
+- die "usage: launchn.pl <config-file>\n";
++ die "usage: launchn <config-file>\n";
+ }
+
+ my $CONFIG_FILE = "";
+-my $CPUS = Sys::CPU::cpu_count();
++chomp (my $CPUS = `nproc`);
+
+ if (scalar (@ARGV) != 1 || !(-e $ARGV[0]) ) {
+ usage();
+-}
++}
+ print "looks like we have $CPUS cpus\n";
+
+-$CONFIG_FILE = $ARGV[0];
++chomp ($CONFIG_FILE = `realpath $ARGV[0]`);
+ for (my $i=0; $i<$CPUS; $i++) {
+ my $dir = "work$i";
+ system "rm -rf $dir";
+ system "mkdir $dir";
+ chdir $dir;
+- system "nice -19 nohup ../compiler_test.pl 0 ../$CONFIG_FILE > output.txt 2>&1 &";
++ system "nice -19 nohup compiler_test 0 $CONFIG_FILE > output.txt 2>&1 &";
+ print "start working in $dir\n";
+ chdir "..";
+ }