Commit 307ae611 authored by Tamar Christina's avatar Tamar Christina Committed by Ben Gamari

Fix nofib benchmarks on Windows.

Summary:
This allows nofib to run on Windows using `msys`.

Also deprecates the old `cygwin` stuff.

Test Plan: make clean && make

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: RyanGlScott, #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D3030
parent ce4b36b5
......@@ -19,9 +19,17 @@ RM = rm -f
SIZE = size
STRIP = strip
PERL = /usr/bin/perl
CONTEXT_DIFF = diff -U 1
CONTEXT_DIFF_RAW = diff -U 1
EXECUTABLE_FILE = chmod +x
# Windows MSYS specific settings
ifeq ($(shell uname -o), Msys)
exeext=.exe
CONTEXT_DIFF=$(CONTEXT_DIFF_RAW) --strip-trailing-cr
else
CONTEXT_DIFF=$(CONTEXT_DIFF_RAW)
endif
# Benchmarks controls which set of tests should be run
# You can run one or more of
# imaginary
......
......@@ -55,12 +55,11 @@ if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$TmpPrefix = '/tmp';
$ENV{'TMPDIR'} = '/tmp'; # set the env var as well
}
# If this is Cygwin, ignore eol and CR characters.
# Perhaps required for MSYS too, although the cygpath
# bit is hopefully unnecessary.
if ( `uname | grep CYGWIN` ) {
$cmp = "cmp -s";
# If this is Msys, ignore eol and CR characters.
if ( `uname -o | grep Msys` ) {
$CONTEXT_DIFF=$CONTEXT_DIFF . " --strip-trailing-cr" ;
$TmpPrefix = `cygpath -m $TmpPrefix | tr -d \\\\n`;
$cmp = $CONTEXT_DIFF . " -q";
}
$ScriptFile = "$TmpPrefix/run_me$$";
$DefaultStdoutFile = "$TmpPrefix/no_stdout$$"; # can't use /dev/null (e.g. Alphas)
......@@ -260,7 +259,7 @@ else
$PostScriptLines
hit='NO'
for out_file in @PgmStdoutFile ; do
if cmp -s \$out_file $TmpPrefix/runtest$$.1 ; then
if $cmp \$out_file $TmpPrefix/runtest$$.1 ; then
hit='YES'
fi
done
......@@ -286,7 +285,7 @@ fi
hit='NO'
for out_file in @PgmStderrFile ; do
if cmp -s \$out_file $TmpPrefix/runtest$$.2 ; then
if $cmp \$out_file $TmpPrefix/runtest$$.2 ; then
hit='YES'
fi
done
......
......@@ -18,13 +18,13 @@ fasta-c : ../fasta/fasta-c.c
$(CC) -std=gnu99 -O3 -fomit-frame-pointer $< -o $@
knucleotide-input250000.txt : fasta-c
./fasta-c $(FAST_OPTS) > $@
./fasta-c $(FAST_OPTS) | tr -d '\r' > $@
knucleotide-input2500000.txt : fasta-c
./fasta-c $(NORM_OPTS) > $@
./fasta-c $(NORM_OPTS) | tr -d '\r' > $@
knucleotide-input25000000.txt : fasta-c
./fasta-c $(SLOW_OPTS) > $@
./fasta-c $(SLOW_OPTS) | tr -d '\r' > $@
ifeq "$(mode)" "slow"
INPUT_FILE = knucleotide-input25000000.txt
......
......@@ -23,13 +23,13 @@ fasta-c : ../fasta/fasta-c.c
$(CC) -std=gnu99 -O3 -fomit-frame-pointer $< -o $@
revcomp-input250000.txt : fasta-c
./fasta-c $(FAST_OPTS) > $@
./fasta-c $(FAST_OPTS) | tr -d '\r' > $@
revcomp-input2500000.txt : fasta-c
./fasta-c $(NORM_OPTS) > $@
./fasta-c $(NORM_OPTS) | tr -d '\r' > $@
revcomp-input25000000.txt : fasta-c
./fasta-c $(SLOW_OPTS) > $@
./fasta-c $(SLOW_OPTS) | tr -d '\r' > $@
ifeq "$(mode)" "slow"
INPUT_FILE = revcomp-input25000000.txt
......
result1 = 21167.208319565725
result2 = 2.5472441940698405e-11
result3 = 2.2515175714943325e-6
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment