Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix run-test for macOS standard tools #948

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ execute_test () {
echo "Running tests for ${exercise_name}";

#remove the ignore line
sed -i 's/TEST_IGNORE();//' ./test_*.c
sed -i='' 's/TEST_IGNORE();//' ./test_*.c

# Copy the examples with the correct name for the exercise
if [ -e ".meta/example.c" ]
Expand Down Expand Up @@ -56,14 +56,15 @@ copy_exercises () {
then
local directory="${1}"
shift
echo "Copying ${directory} exercises ${*}"
mkdir -p "build/${directory}"
if [ $# -gt 0 ]
then
echo "Copying ${directory} exercises ${*}"
cd "exercises/${directory}"
cp -r "$@" "../../build/${directory}/"
cd "../.."
else
echo "Copying all ${directory} exercises"
cp -r "exercises/${directory}" "build"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Firstly make sure you have the necessary applications installed (such as `clang-
If you'd like to run only some of the tests to check your work, you can specify them as arguments to the run-tests script.

```bash
~/git/c$ ./bin/run-tests acronym all-your-base allergies
~/git/c$ ./bin/run-tests -p -e acronym -e all-your-base -e allergies
```

## Test Runner
Expand Down