2021-04-01 08:39:03 +00:00
|
|
|
all: build test
|
|
|
|
all-release: build-release test-release
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
#----------#
|
|
|
|
# building #
|
|
|
|
#----------#
|
|
|
|
|
|
|
|
# compile the exa binary
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
@build:
|
|
|
|
cargo build
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
# compile the exa binary (in release mode)
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
@build-release:
|
|
|
|
cargo build --release --verbose
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
# produce an HTML chart of compilation timings
|
|
|
|
@build-time:
|
|
|
|
cargo +nightly clean
|
|
|
|
cargo +nightly build -Z timings
|
|
|
|
|
|
|
|
# check that the exa binary can compile
|
|
|
|
@check:
|
|
|
|
cargo check
|
2020-10-09 23:57:20 +00:00
|
|
|
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
#---------------#
|
|
|
|
# running tests #
|
|
|
|
#---------------#
|
|
|
|
|
|
|
|
# run unit tests
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
@test:
|
2021-04-01 08:39:03 +00:00
|
|
|
cargo test --workspace -- --quiet
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
# run unit tests (in release mode)
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
@test-release:
|
2021-04-01 08:39:03 +00:00
|
|
|
cargo test --workspace --release --verbose
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
#-----------------------#
|
|
|
|
# code quality and misc #
|
|
|
|
#-----------------------#
|
|
|
|
|
|
|
|
# lint the code
|
2020-10-10 12:33:50 +00:00
|
|
|
@clippy:
|
|
|
|
touch src/main.rs
|
|
|
|
cargo clippy
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
# update dependency versions, and checks for outdated ones
|
2020-10-24 20:22:07 +00:00
|
|
|
@update-deps:
|
2020-10-10 01:14:35 +00:00
|
|
|
cargo update
|
2020-10-24 20:22:07 +00:00
|
|
|
command -v cargo-outdated >/dev/null || (echo "cargo-outdated not installed" && exit 1)
|
2020-10-10 01:14:35 +00:00
|
|
|
cargo outdated
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
# list unused dependencies
|
2020-10-24 20:22:07 +00:00
|
|
|
@unused-deps:
|
|
|
|
command -v cargo-udeps >/dev/null || (echo "cargo-udeps not installed" && exit 1)
|
|
|
|
cargo +nightly udeps
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
# check that every combination of feature flags is successful
|
|
|
|
@check-features:
|
|
|
|
command -v cargo-hack >/dev/null || (echo "cargo-hack not installed" && exit 1)
|
|
|
|
cargo hack check --feature-powerset
|
|
|
|
|
|
|
|
# print versions of the necessary build tools
|
Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-09 23:47:17 +00:00
|
|
|
@versions:
|
|
|
|
rustc --version
|
|
|
|
cargo --version
|
2020-10-13 19:19:00 +00:00
|
|
|
|
|
|
|
|
2021-04-01 08:39:03 +00:00
|
|
|
#---------------#
|
|
|
|
# documentation #
|
|
|
|
#---------------#
|
|
|
|
|
|
|
|
# build the man pages
|
2020-10-13 19:19:00 +00:00
|
|
|
@man:
|
|
|
|
mkdir -p "${CARGO_TARGET_DIR:-target}/man"
|
2023-10-02 14:58:16 +00:00
|
|
|
version=$(awk 'BEGIN { FS = "\"" } ; /^version/ { print $2 ; exit }' Cargo.toml); \
|
2023-09-27 21:44:32 +00:00
|
|
|
for page in eza.1 eza_colors.5 eza_colors-explanation.5; do \
|
2023-10-02 15:02:36 +00:00
|
|
|
sed "s/\$version/v${version}/g" "man/${page}.md" | pandoc --standalone -f markdown -t man > "${CARGO_TARGET_DIR:-target}/man/${page}"; \
|
2023-09-27 21:44:32 +00:00
|
|
|
done;
|
2020-10-13 19:19:00 +00:00
|
|
|
|
2023-07-29 12:19:05 +00:00
|
|
|
# build and preview the main man page (eza.1)
|
2020-10-13 19:19:00 +00:00
|
|
|
@man-1-preview: man
|
2023-07-29 12:19:05 +00:00
|
|
|
man "${CARGO_TARGET_DIR:-target}/man/eza.1"
|
2020-10-13 19:19:00 +00:00
|
|
|
|
2023-07-29 12:19:05 +00:00
|
|
|
# build and preview the colour configuration man page (eza_colors.5)
|
2020-10-13 19:19:00 +00:00
|
|
|
@man-5-preview: man
|
2023-07-29 12:19:05 +00:00
|
|
|
man "${CARGO_TARGET_DIR:-target}/man/eza_colors.5"
|
2023-08-04 04:04:28 +00:00
|
|
|
|
|
|
|
# build and preview the colour configuration man page (eza_colors.5)
|
|
|
|
@man-5-explanations-preview: man
|
|
|
|
man "${CARGO_TARGET_DIR:-target}/man/eza_colors-explanation.5"
|
2023-08-22 08:56:09 +00:00
|
|
|
|
|
|
|
#---------------#
|
|
|
|
# release #
|
|
|
|
#---------------#
|
|
|
|
|
2023-10-04 11:29:27 +00:00
|
|
|
new_version := "$(convco version --bump)"
|
|
|
|
|
2023-08-22 08:56:09 +00:00
|
|
|
# If you're not cafkafk and she isn't dead, don't run this!
|
2023-10-08 20:49:06 +00:00
|
|
|
#
|
2023-08-22 08:56:09 +00:00
|
|
|
# usage: release major, release minor, release patch
|
2023-10-08 20:49:06 +00:00
|
|
|
release:
|
2023-10-04 11:29:27 +00:00
|
|
|
cargo bump "{{new_version}}"
|
2023-10-04 11:35:14 +00:00
|
|
|
git cliff -t "{{new_version}}" > CHANGELOG.md
|
2023-08-22 08:56:09 +00:00
|
|
|
cargo check
|
|
|
|
nix build -L ./#clippy
|
2023-10-04 11:35:14 +00:00
|
|
|
git checkout -b "cafk-release-v{{new_version}}"
|
|
|
|
git commit -asm "chore: release eza v{{new_version}}"
|
2023-08-22 08:56:09 +00:00
|
|
|
git push
|
2023-10-04 11:36:54 +00:00
|
|
|
@echo "waiting 10 seconds for github to catch up..."
|
2023-08-22 08:56:09 +00:00
|
|
|
sleep 10
|
2023-10-08 20:49:06 +00:00
|
|
|
gh pr create --draft --title "chore: release v{{new_version}}" --body "This PR was auto-generated by our lovely just file" --reviewer cafkafk
|
2023-10-04 11:29:27 +00:00
|
|
|
@echo "Now go review that and come back and run gh-release"
|
|
|
|
|
|
|
|
@gh-release:
|
2023-10-04 11:53:31 +00:00
|
|
|
git tag -d "v{{new_version}}" || echo "tag not found, creating";
|
2023-10-04 11:35:14 +00:00
|
|
|
git tag -a "v{{new_version}}" -m "auto generated by the justfile for eza v$(convco version)"
|
2023-10-04 11:53:31 +00:00
|
|
|
just cross
|
2023-10-04 11:29:27 +00:00
|
|
|
mkdir -p ./target/"release-notes-$(convco version)"
|
2023-10-04 11:53:31 +00:00
|
|
|
git cliff -t "v$(convco version)" --current > ./target/"release-notes-$(convco version)/RELEASE.md"
|
2023-10-04 11:29:27 +00:00
|
|
|
just checksum >> ./target/"release-notes-$(convco version)/RELEASE.md"
|
|
|
|
|
2023-10-04 11:53:31 +00:00
|
|
|
gh release create "v$(convco version)" --target "$(git rev-parse HEAD)" --title "eza v$(convco version)" -d -F ./target/"release-notes-$(convco version)/RELEASE.md" ./target/"bin-$(convco version)"/*
|
2023-09-07 07:44:30 +00:00
|
|
|
|
2023-09-15 07:55:40 +00:00
|
|
|
#----------------#
|
|
|
|
# binaries #
|
|
|
|
#----------------#
|
|
|
|
|
2023-09-15 07:42:13 +00:00
|
|
|
tar BINARY TARGET:
|
|
|
|
tar czvf ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}.tar.gz -C ./target/{{TARGET}}/release/ ./{{BINARY}}
|
|
|
|
|
|
|
|
zip BINARY TARGET:
|
|
|
|
zip -j ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}.zip ./target/{{TARGET}}/release/{{BINARY}}
|
|
|
|
|
2023-10-01 05:23:09 +00:00
|
|
|
tar_static BINARY TARGET:
|
|
|
|
tar czvf ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}_static.tar.gz -C ./target/{{TARGET}}/release/ ./{{BINARY}}
|
|
|
|
|
|
|
|
zip_static BINARY TARGET:
|
|
|
|
zip -j ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}_static.zip ./target/{{TARGET}}/release/{{BINARY}}
|
|
|
|
|
2023-09-15 07:42:13 +00:00
|
|
|
binary BINARY TARGET:
|
|
|
|
rustup target add {{TARGET}}
|
|
|
|
cross build --release --target {{TARGET}}
|
|
|
|
just tar {{BINARY}} {{TARGET}}
|
|
|
|
just zip {{BINARY}} {{TARGET}}
|
|
|
|
|
2023-09-27 16:12:39 +00:00
|
|
|
binary_static BINARY TARGET:
|
|
|
|
rustup target add {{TARGET}}
|
|
|
|
RUSTFLAGS='-C target-feature=+crt-static' cross build --release --target {{TARGET}}
|
2023-10-01 05:23:09 +00:00
|
|
|
just tar_static {{BINARY}} {{TARGET}}
|
|
|
|
just zip_static {{BINARY}} {{TARGET}}
|
2023-09-27 16:12:39 +00:00
|
|
|
|
2023-09-15 07:55:40 +00:00
|
|
|
checksum:
|
2023-10-02 14:36:18 +00:00
|
|
|
@echo "# Checksums"
|
|
|
|
@echo "## sha256sum"
|
|
|
|
@echo '```'
|
|
|
|
@sha256sum ./target/"bin-$(convco version)"/*
|
|
|
|
@echo '```'
|
|
|
|
@echo "## md5sum"
|
|
|
|
@echo '```'
|
|
|
|
@md5sum ./target/"bin-$(convco version)"/*
|
|
|
|
@echo '```'
|
2023-09-15 07:55:40 +00:00
|
|
|
|
2023-09-15 07:42:13 +00:00
|
|
|
alias c := cross
|
|
|
|
|
2023-09-15 07:55:40 +00:00
|
|
|
# Generate release binaries for EZA
|
2023-10-08 20:49:06 +00:00
|
|
|
#
|
2023-09-07 07:44:30 +00:00
|
|
|
# usage: cross
|
2023-10-08 20:49:06 +00:00
|
|
|
@cross:
|
2023-09-15 07:42:13 +00:00
|
|
|
# Setup Output Directory
|
|
|
|
mkdir -p ./target/"bin-$(convco version)"
|
|
|
|
|
2023-09-15 07:13:02 +00:00
|
|
|
# Install Toolchains/Targets
|
2023-09-07 07:44:30 +00:00
|
|
|
rustup toolchain install stable
|
2023-09-15 07:13:02 +00:00
|
|
|
|
|
|
|
## Linux
|
|
|
|
### x86
|
2023-09-15 07:42:13 +00:00
|
|
|
just binary eza x86_64-unknown-linux-gnu
|
2023-10-03 12:53:17 +00:00
|
|
|
# just binary_static eza x86_64-unknown-linux-gnu
|
2023-09-15 07:42:13 +00:00
|
|
|
just binary eza x86_64-unknown-linux-musl
|
2023-10-08 20:47:15 +00:00
|
|
|
# just binary_static eza x86_64-unknown-linux-musl
|
2023-09-15 07:13:02 +00:00
|
|
|
|
|
|
|
### aarch
|
2023-09-15 07:42:13 +00:00
|
|
|
just binary eza aarch64-unknown-linux-gnu
|
2023-10-01 04:54:33 +00:00
|
|
|
# BUG: just binary_static eza aarch64-unknown-linux-gnu
|
2023-09-15 07:13:02 +00:00
|
|
|
|
|
|
|
### arm
|
2023-09-15 07:42:13 +00:00
|
|
|
just binary eza arm-unknown-linux-gnueabihf
|
2023-10-03 12:53:17 +00:00
|
|
|
# just binary_static eza arm-unknown-linux-gnueabihf
|
2023-09-15 07:13:02 +00:00
|
|
|
|
2023-09-15 08:29:55 +00:00
|
|
|
## MacOS
|
|
|
|
# TODO: just binary eza x86_64-apple-darwin
|
|
|
|
|
2023-09-15 07:13:02 +00:00
|
|
|
## Windows
|
|
|
|
### x86
|
2023-09-15 07:42:13 +00:00
|
|
|
just binary eza.exe x86_64-pc-windows-gnu
|
2023-10-03 12:53:17 +00:00
|
|
|
# just binary_static eza.exe x86_64-pc-windows-gnu
|
2023-09-15 08:29:55 +00:00
|
|
|
# TODO: just binary eza.exe x86_64-pc-windows-gnullvm
|
|
|
|
# TODO: just binary eza.exe x86_64-pc-windows-msvc
|
2023-09-11 09:48:55 +00:00
|
|
|
|
|
|
|
# Generate Checksums
|
2023-10-04 11:29:27 +00:00
|
|
|
# TODO: moved to gh-release just checksum
|
2023-09-12 12:51:56 +00:00
|
|
|
|
|
|
|
#---------------------#
|
|
|
|
# Integration testing #
|
|
|
|
#---------------------#
|
|
|
|
|
2023-09-15 11:22:02 +00:00
|
|
|
alias gen := gen_test_dir
|
|
|
|
|
|
|
|
test_dir := "tests/test_dir"
|
|
|
|
|
|
|
|
gen_test_dir:
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
rm {{test_dir}} -r;
|
|
|
|
mkdir -p {{test_dir}}
|
|
|
|
cd {{test_dir}};
|
|
|
|
|
|
|
|
# BEGIN grid
|
|
|
|
mkdir -p grid
|
|
|
|
cd grid
|
|
|
|
|
|
|
|
mkdir $(seq -w 001 1000);
|
|
|
|
seq 0001 1000 | split -l 1 -a 3 -d - file_
|
|
|
|
|
|
|
|
# Set time to unix epoch
|
|
|
|
touch --date=@0 *;
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# END grid
|
|
|
|
|
|
|
|
# BEGIN git
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:22:02 +00:00
|
|
|
mkdir -p git
|
|
|
|
cd git
|
|
|
|
|
|
|
|
mkdir $(seq -w 001 10);
|
|
|
|
for f in ./*
|
|
|
|
do
|
|
|
|
cd $f
|
|
|
|
git init
|
|
|
|
seq 01 10 | split -l 1 -a 3 -d - file_
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ..
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:22:02 +00:00
|
|
|
# END git
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:31:20 +00:00
|
|
|
# BEGIN test_root
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:31:20 +00:00
|
|
|
sudo mkdir root
|
|
|
|
sudo chmod 777 root
|
|
|
|
sudo mkdir root/empty
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:31:20 +00:00
|
|
|
# END test_root
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:31:20 +00:00
|
|
|
# BEGIN mknod
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:31:20 +00:00
|
|
|
mkdir -p specials
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:31:20 +00:00
|
|
|
sudo mknod specials/block-device b 3 60
|
|
|
|
sudo mknod specials/char-device c 14 40
|
|
|
|
sudo mknod specials/named-pipe p
|
|
|
|
|
|
|
|
# END test_root
|
2023-10-08 20:49:06 +00:00
|
|
|
|
2023-09-15 11:22:02 +00:00
|
|
|
eza -l --grid;
|
|
|
|
|
2023-09-12 12:51:56 +00:00
|
|
|
# Runs integration tests in nix sandbox
|
|
|
|
#
|
|
|
|
# Required nix, likely won't work on windows.
|
|
|
|
@itest:
|
2023-10-05 12:00:18 +00:00
|
|
|
nix build -L ./#trycmd-local
|
2023-09-12 12:51:56 +00:00
|
|
|
|
|
|
|
# Runs integration tests in nix sandbox, and dumps outputs.
|
|
|
|
#
|
|
|
|
# WARNING: this can cause loss of work
|
|
|
|
@idump:
|
2023-10-08 20:49:06 +00:00
|
|
|
rm ./tests/cmd/*nix.stderr -f || echo
|
2023-09-12 12:51:56 +00:00
|
|
|
rm ./tests/cmd/*nix.stdout -f || echo
|
|
|
|
nix build -L ./#trydump
|
|
|
|
cp ./result/dump/*nix.* ./tests/cmd/
|