Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/6.0/release' into 6.0/patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rasantel committed Jan 21, 2021
2 parents 21d4916 + 6a4542b commit 019a1e6
Show file tree
Hide file tree
Showing 74 changed files with 2,225 additions and 1,656 deletions.
31 changes: 28 additions & 3 deletions .github/scripts/verify-query-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,21 @@ read -r -a fields <<<"$(./query-packages.sh single -o git-url zfs 2>&1)"
test ${#fields[@]} -eq 1
test "${fields[0]}" == 'https://github.com/delphix/zfs.git'

# Expect: "bpftrace bcc true https://github.com/delphix/bpftrace.git"
read -r -a fields <<<"$(./query-packages.sh single -o name,dependencies,can-update,git-url bpftrace 2>&1)"
test ${#fields[@]} -eq 4
test "${fields[0]}" == 'bpftrace'
test "${fields[1]}" == 'bcc'
test "${fields[2]}" == 'true'
test "${fields[3]}" == 'https://github.com/delphix/bpftrace.git'

# Expect that "list all" outputs all directory names under packages/
diff <(ls -1 packages | sort) <(./query-packages.sh list all 2>&1 | sort)

# Expect that outputing git-url for all packages works and that the output
# Expect that outputing dependencies & git-url for all packages works and that the output
# length corresponds to the number of packages.
test "$(ls -1 packages | wc -l)" -eq "$(./query-packages.sh list -o name,git-url all 2>&1 | wc -l)"
test "$(ls -1 packages | wc -l)" -eq \
"$(./query-packages.sh list -o name,dependencies,can-update,git-url all 2>&1 | wc -l)"

# Check that all package lists under package-lists\ can be loaded and that each
# line of the output of the command actually refers to a package.
Expand All @@ -47,9 +56,25 @@ find package-lists -name '*.pkgs' | while read -r list; do
) >/dev/null
done

# Check that querying "appliance" list works
# Check that querying the built-in "appliance" list works
./query-packages.sh list appliance >/dev/null

# Check that querying lists used by the Delphix build works.
./query-packages.sh list build/main.pkgs >/dev/null
./query-packages.sh list build/kernel-modules.pkgs >/dev/null
./query-packages.sh list linux-kernel >/dev/null
./query-packages.sh list update/main.pkgs >/dev/null

# Check that overriding TARGET_KERNEL_FLAVORS changes which kernel packages are
# returned.
test "$(./query-packages.sh list linux-kernel | wc -l | awk '{print $1}')" -gt 1
test "$(TARGET_KERNEL_FLAVORS=generic ./query-packages.sh list linux-kernel)" == "linux-kernel-generic"

# Check that when a package has multiple dependencies they are printed in the
# expected format.
test "$(TARGET_KERNEL_FLAVORS="generic aws" ./query-packages.sh single -o dependencies zfs)" == \
"linux-kernel-generic,linux-kernel-aws"

# Check that the output from the appliance list contains zfs and
# delphix-platform packages. Note, we explicitly do not use grep -q here as it
# exits as soon as a match is found and that causes a broken pipe error as
Expand Down
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,14 @@
default:
@echo 'This Makefile is only used for cleaning the repository and'
@echo 'running the style checks. To build packages, first run'
@echo './setup.sh, then run ./buildlist.sh <list> by passing the'
@echo 'appropriate package list. For instance to build the "userland"'
@echo 'package list, run:'
@echo ' ./setup.sh && ./buildlist.sh userland'
@echo 'You can also build a single package with:'
@echo ' ./setup.sh && ./buildpkg.sh <pkg>'
@echo './setup.sh, then run ./buildpkg.sh <package>.
@echo 'Refer to the README for more info.'

clean:
@sudo rm -rf packages/*/tmp
@rm -rf artifacts
@rm -f *.buildinfo *.changes *.deb
@rm -rf update-status
@build-info-pkg/clean.sh

shellcheck:
shellcheck --exclude=SC1090,SC1091 \
Expand Down
Loading

0 comments on commit 019a1e6

Please sign in to comment.