File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
+
2
3
# This is a library which contains functions used inside ci/build
3
4
#
4
5
# We separated it into it's own file so that we could easily unit test
5
6
# these functions and helpers.
6
- set -euo pipefai
7
7
8
8
# On some CPU architectures (notably node/uname "armv7l", default on Raspberry Pis),
9
9
# different package managers have different labels for the same CPU (deb=armhf, rpm=armhfp).
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bats
2
+
3
+ SCRIPT_NAME=" build-lib.sh"
4
+ SCRIPT=" $BATS_TEST_DIRNAME /../../ci/build/$SCRIPT_NAME "
5
+
6
+ source " $SCRIPT "
7
+
8
+ @test " get_nfpm_arch should return armhfp for rpm on armv7l" {
9
+ PKG_FORMAT=" rpm" ARCH=" armv7l" run get_nfpm_arch
10
+ [ " $output " = " armhfp" ]
11
+ }
12
+
13
+ @test " get_nfpm_arch should return armhf for deb on armv7l" {
14
+ PKG_FORMAT=" deb" ARCH=" armv7l" run get_nfpm_arch
15
+ [ " $output " = " armhf" ]
16
+ }
17
+
18
+ @test " get_nfpm_arch should return arch if no arch override exists " {
19
+ PKG_FORMAT=" deb" ARCH=" i386" run get_nfpm_arch
20
+ [ " $output " = " i386" ]
21
+ }
You can’t perform that action at this time.
0 commit comments