Move tools to a tools/src directory
Allows bash scripts to share the same name as the directory. Add fix-tests bash script. Change-Id: Iaf1943d50ec1fd3f382a2c7823fb7cdd13b1d9a2 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47766 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
648b05e4e2
commit
434cd396fe
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2021 The Tint Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# See https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
|
||||
|
||||
if [ ! -x "$(which go)" ] ; then
|
||||
echo "error: go needs to be on \$PATH to use $0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
|
||||
ROOT_DIR="$( cd "${SCRIPT_DIR}/.." >/dev/null 2>&1 && pwd )"
|
||||
|
||||
TARGET_EXE="$(realpath $1)"
|
||||
|
||||
pushd ${SCRIPT_DIR}/src/fix-tests
|
||||
go run fix-tests.go "${TARGET_EXE}"
|
||||
popd
|
|
@ -1,5 +0,0 @@
|
|||
module dawn.googlesource.com/tint/tools/fix-tests
|
||||
|
||||
go 1.16
|
||||
|
||||
require github.com/sergi/go-diff v1.2.0
|
|
@ -25,7 +25,7 @@ FILES="`find src -type f` `find samples -type f`"
|
|||
if command -v go &> /dev/null
|
||||
then
|
||||
# Go is installed. Run cpplint in parallel for speed wins
|
||||
go run $SCRIPT_DIR/run-parallel/main.go \
|
||||
go run $SCRIPT_DIR/src/run-parallel/main.go \
|
||||
--only-print-failures \
|
||||
./third_party/cpplint/cpplint/cpplint.py \
|
||||
--root=$ROOT_DIR \
|
||||
|
|
|
@ -26,7 +26,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"dawn.googlesource.com/tint/tools/fix-tests/substr"
|
||||
"dawn.googlesource.com/tint/tools/src/fix-tests/substr"
|
||||
)
|
||||
|
||||
func main() {
|
|
@ -0,0 +1,5 @@
|
|||
module dawn.googlesource.com/tint/tools/src/fix-tests
|
||||
|
||||
go 1.16
|
||||
|
||||
require github.com/sergi/go-diff v1.2.0
|
|
@ -23,7 +23,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"dawn.googlesource.com/tint/tools/trim-includes/match"
|
||||
"dawn.googlesource.com/tint/tools/src/trim-includes/match"
|
||||
)
|
||||
|
||||
// Scan walks all files and subdirectories from root, returning those
|
|
@ -0,0 +1,3 @@
|
|||
module dawn.googlesource.com/tint/tools/src/trim-includes
|
||||
|
||||
go 1.16
|
|
@ -35,7 +35,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"dawn.googlesource.com/tint/tools/trim-includes/glob"
|
||||
"dawn.googlesource.com/tint/tools/src/trim-includes/glob"
|
||||
)
|
||||
|
||||
var (
|
|
@ -1,3 +0,0 @@
|
|||
module dawn.googlesource.com/tint/tools/trim-includes
|
||||
|
||||
go 1.16
|
Loading…
Reference in New Issue