mirror of
https://github.com/uutils/coreutils
synced 2024-12-12 14:22:41 +00:00
build-gnu.sh: build in debug by default. Easier for local dev
This commit is contained in:
parent
28111407a3
commit
ba0c89fc5e
3 changed files with 17 additions and 8 deletions
4
.github/workflows/GnuTests.yml
vendored
4
.github/workflows/GnuTests.yml
vendored
|
@ -116,7 +116,7 @@ jobs:
|
|||
run: |
|
||||
## Build binaries
|
||||
cd '${{ steps.vars.outputs.path_UUTILS }}'
|
||||
bash util/build-gnu.sh
|
||||
bash util/build-gnu.sh --release-build
|
||||
- name: Run GNU tests
|
||||
shell: bash
|
||||
run: |
|
||||
|
@ -354,7 +354,7 @@ jobs:
|
|||
run: |
|
||||
## Build binaries
|
||||
cd uutils
|
||||
UU_MAKE_PROFILE=debug bash util/build-gnu.sh
|
||||
bash util/build-gnu.sh
|
||||
- name: Run GNU tests
|
||||
run: bash uutils/util/run-gnu-test.sh
|
||||
- name: Generate coverage data (via `grcov`)
|
||||
|
|
|
@ -226,8 +226,8 @@ To run uutils against the GNU test suite locally, run the following commands:
|
|||
|
||||
```shell
|
||||
bash util/build-gnu.sh
|
||||
# Build uutils without release optimizations
|
||||
UU_MAKE_PROFILE=debug bash util/build-gnu.sh
|
||||
# Build uutils with release optimizations
|
||||
bash util/build-gnu.sh --release-build
|
||||
bash util/run-gnu-test.sh
|
||||
# To run a single test:
|
||||
bash util/run-gnu-test.sh tests/touch/not-owner.sh # for example
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/bash
|
||||
# `build-gnu.bash` ~ builds GNU coreutils (from supplied sources)
|
||||
#
|
||||
# UU_MAKE_PROFILE == 'debug' | 'release' ## build profile for *uutils* build; may be supplied by caller, defaults to 'release'
|
||||
|
||||
# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW baddecode submodules ; (vars/env) SRCDIR vdir rcexp xpart dired
|
||||
|
||||
|
@ -11,6 +10,19 @@ ME="${0}"
|
|||
ME_dir="$(dirname -- "$(readlink -fm -- "${ME}")")"
|
||||
REPO_main_dir="$(dirname -- "${ME_dir}")"
|
||||
|
||||
# Default profile is 'debug'
|
||||
UU_MAKE_PROFILE='debug'
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
if [ "$arg" == "--release-build" ]; then
|
||||
UU_MAKE_PROFILE='release'
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "UU_MAKE_PROFILE='${UU_MAKE_PROFILE}'"
|
||||
|
||||
### * config (from environment with fallback defaults); note: GNU is expected to be a sibling repo directory
|
||||
|
||||
path_UUTILS=${path_UUTILS:-${REPO_main_dir}}
|
||||
|
@ -56,9 +68,6 @@ echo "path_GNU='${path_GNU}'"
|
|||
|
||||
###
|
||||
|
||||
UU_MAKE_PROFILE=${UU_MAKE_PROFILE:-release}
|
||||
echo "UU_MAKE_PROFILE='${UU_MAKE_PROFILE}'"
|
||||
|
||||
UU_BUILD_DIR="${path_UUTILS}/target/${UU_MAKE_PROFILE}"
|
||||
echo "UU_BUILD_DIR='${UU_BUILD_DIR}'"
|
||||
|
||||
|
|
Loading…
Reference in a new issue