|
| 1 | +#/ |
| 2 | +# @license Apache-2.0 |
| 3 | +# |
| 4 | +# Copyright (c) 2017 The Stdlib Authors. |
| 5 | +# |
| 6 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +# you may not use this file except in compliance with the License. |
| 8 | +# You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | +#/ |
| 18 | + |
| 19 | +# VARIABLES # |
| 20 | + |
| 21 | +# Define the command flags: |
| 22 | +FIND_TOOLS_TESTS_FIXTURES_FLAGS ?= \ |
| 23 | + -type f \ |
| 24 | + -name "$(TESTS_FIXTURES_PATTERN)" \ |
| 25 | + -path "*/$(TESTS_FIXTURES_FOLDER)/**" \ |
| 26 | + -regex "$(TESTS_FIXTURES_FILTER)" \ |
| 27 | + $(FIND_TOOLS_TESTS_FIXTURES_EXCLUDE_FLAGS) |
| 28 | + |
| 29 | +ifneq ($(OS), Darwin) |
| 30 | + FIND_TOOLS_TESTS_FIXTURES_FLAGS := -regextype posix-extended $(FIND_TOOLS_TESTS_FIXTURES_FLAGS) |
| 31 | +endif |
| 32 | + |
| 33 | +# Define a command to list files: |
| 34 | +FIND_TOOLS_TESTS_FIXTURES_CMD ?= find $(find_kernel_prefix) $(TOOLS_DIR) $(TOOLS_PKGS_DIR) $(FIND_TOOLS_TESTS_FIXTURES_FLAGS) |
| 35 | + |
| 36 | +# Define the list of files: |
| 37 | +TOOLS_TESTS_FIXTURES ?= $(shell $(FIND_TOOLS_TESTS_FIXTURES_CMD)) |
| 38 | + |
| 39 | + |
| 40 | +# TARGETS # |
| 41 | + |
| 42 | +# List test fixture files. |
| 43 | +# |
| 44 | +# This target prints a newline-delimited list of test fixture files. |
| 45 | + |
| 46 | +list-tools-tests-fixtures: |
| 47 | + $(QUIET) find $(find_kernel_prefix) $(TOOLS_DIR) $(TOOLS_PKGS_DIR) $(FIND_TOOLS_TESTS_FIXTURES_FLAGS) $(find_print_list) |
| 48 | + |
| 49 | +.PHONY: list-tools-tests-fixtures |
0 commit comments