OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 set -o nounset | 7 set -o nounset |
8 set -o errexit | 8 set -o errexit |
9 | 9 |
10 # The script is located in "native_client/tests/spec2k" | 10 # The script is located in "native_client/tests/spec2k" |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 SubBanner "Populating: $i" | 1005 SubBanner "Populating: $i" |
1006 # fix the dir with the same name inside spec harness | 1006 # fix the dir with the same name inside spec harness |
1007 src=$(find -H ${harness} -name $i) | 1007 src=$(find -H ${harness} -name $i) |
1008 # copy relevant dirs over | 1008 # copy relevant dirs over |
1009 echo "COPY" | 1009 echo "COPY" |
1010 rm -rf src/ data/ | 1010 rm -rf src/ data/ |
1011 cp -r ${src}/data ${src}/src $i | 1011 cp -r ${src}/data ${src}/src $i |
1012 # patch if necessary | 1012 # patch if necessary |
1013 if [[ -e $i/diff ]] ; then | 1013 if [[ -e $i/diff ]] ; then |
1014 echo "PATCH" | 1014 echo "PATCH" |
1015 patch -d $i --verbose -p0 < $i/diff | 1015 patch -l -d $i --verbose -p0 < $i/diff |
1016 fi | 1016 fi |
1017 | 1017 |
1018 echo "COMPLETE" | 1018 echo "COMPLETE" |
1019 done | 1019 done |
1020 } | 1020 } |
1021 | 1021 |
1022 #@ | 1022 #@ |
1023 #@ BuildPrerequisites <platform> <bitcode> | 1023 #@ BuildPrerequisites <platform> <bitcode> |
1024 #@ | 1024 #@ |
1025 #@ Invoke scons to build some potentially missing components, e.g. | 1025 #@ Invoke scons to build some potentially missing components, e.g. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 | 1072 |
1073 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. | 1073 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. |
1074 | 1074 |
1075 if [ "$(type -t $1)" != "function" ]; then | 1075 if [ "$(type -t $1)" != "function" ]; then |
1076 Usage | 1076 Usage |
1077 echo "ERROR: unknown mode '$1'." >&2 | 1077 echo "ERROR: unknown mode '$1'." >&2 |
1078 exit 1 | 1078 exit 1 |
1079 fi | 1079 fi |
1080 | 1080 |
1081 "$@" | 1081 "$@" |
OLD | NEW |