Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit 347153f

Browse files
authored
Merge pull request #22 from nikomatsakis/patches
extend process.sh to support patch stages
2 parents d525abd + f9c888a commit 347153f

File tree

196 files changed

+201604
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+201604
-208
lines changed

futures-rs-test-all/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
rm -f target/debug/all-*
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

helloworld/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

html5ever-2016-08-25/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

hyper.0.5.0/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

inflate-0.1.0/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

issue-32062-equality-relations-complexity/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

issue-32278-big-array-of-strings/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

jld-day15-parser/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

piston-image-0.10.3/makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ touch:
66
find . -name '*.rs' | xargs touch
77
clean:
88
cargo clean
9+
patches:
10+
@echo ''

process.sh

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,66 @@
11
#!/bin/bash
22

3-
TIMES_DIR=/home/ncameron/times
4-
SCRIPTS_DIR=/home/ncameron/times-scripts
3+
if [ -z "$TIMES_DIR" ]; then
4+
TIMES_DIR=/home/ncameron/times
5+
fi
6+
if [ -z "$SCRIPTS_DIR" ]; then
7+
SCRIPTS_DIR=/home/ncameron/times-scripts
8+
fi
9+
10+
echo TIMES_DIR=$TIMES_DIR
11+
echo SCRIPTS_DIR=$SCRIPTS_DIR
512

613
START=$(pwd)
714
export CARGO_RUSTC_OPTS="-Ztime-passes -Zinput-stats"
815
export PATH=$RUSTC_DIR/bin:$PATH
916

10-
for dir in *; do
17+
# Check if user provided list of directories;
18+
# else process them all.
19+
if [ "$1" != "" ]; then
20+
DIRS="$@"
21+
else
22+
DIRS="*"
23+
fi
24+
25+
for dir in $DIRS; do
1126
if [[ -d $dir ]]; then
1227
echo "Processing $dir"
1328

29+
cd $START/$dir
30+
PATCHES=($(make patches))
31+
if [ ! "${PATCHES[*]}" ]; then
32+
PATCHES=('')
33+
fi
34+
35+
echo Patches: ${PATCHES[*]}
36+
1437
for i in 0 1 2 3 4 5
1538
do
16-
cd $RUST_DIR
17-
git show HEAD -s >$TIMES_DIR/raw/$dir--$DATE--$i.log
18-
cd $START/$dir
19-
echo "rustc: ./$dir" >>$TIMES_DIR/raw/$dir--$DATE--$i.log
20-
make >>$TIMES_DIR/raw/$dir--$DATE--$i.log
21-
echo "done" >>$TIMES_DIR/raw/$dir--$DATE--$i.log
22-
39+
for PATCH in "${PATCHES[@]}"; do
40+
cd $RUST_DIR
41+
git show HEAD -s >$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
42+
cd $START/$dir
43+
echo "rustc: ./$dir" >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
44+
make all$PATCH >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
45+
echo "done" >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
46+
done
2347
make touch >/dev/null
2448
done
2549

2650
make clean >/dev/null
2751

2852
cd $TIMES_DIR
29-
python $SCRIPTS_DIR/process.py $dir $DATE 6
53+
for PATCH in "${PATCHES[@]}"; do
54+
python $SCRIPTS_DIR/process.py "$dir$PATCH" "$DATE" 6
55+
done
56+
3057
for i in 0 1 2 3 4 5
3158
do
32-
git add raw/$dir--$DATE--$i.log
33-
git add raw/orbit-$dir--$DATE--$i.log
34-
git add processed/$dir--$DATE--$i.json
59+
for PATCH in "${PATCHES[@]}"; do
60+
git add "raw/$dir$PATCH--$DATE--$i.log"
61+
git add "raw/orbit-$dir$PATCH--$DATE--$i.log"
62+
git add "processed/$dir$PATCH--$DATE--$i.json"
63+
done
3564
done
3665

3766
cd $START

0 commit comments

Comments
 (0)