diff options
author | B. Watson <urchlay@slackware.uk> | 2023-06-17 07:52:18 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-06-17 07:52:18 +0700 |
commit | 49853566bb6ac10e9003d6b703050437e2fd1511 (patch) | |
tree | 149e6a20e6556d5bc1154c56fcd599c84f29f0ef /development/csmith/launchn.diff | |
parent | bbbedab4e2f99511ba667d32e74a78c27dd991f4 (diff) | |
download | slackbuilds-49853566bb6ac10e9003d6b703050437e2fd1511.tar.gz slackbuilds-49853566bb6ac10e9003d6b703050437e2fd1511.tar.xz |
development/csmith: Added (generates random C programs).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/csmith/launchn.diff')
-rw-r--r-- | development/csmith/launchn.diff | 42 |
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 ".."; + } |