fix: ensure CI tests runs against i386 (#10457)
This commit is contained in:
parent
9d8cf9bb2a
commit
80580c070f
|
|
@ -42,6 +42,9 @@ commands:
|
||||||
os:
|
os:
|
||||||
type: string
|
type: string
|
||||||
default: "linux"
|
default: "linux"
|
||||||
|
arch:
|
||||||
|
type: string
|
||||||
|
default: "amd64"
|
||||||
gotestsum:
|
gotestsum:
|
||||||
type: string
|
type: string
|
||||||
default: "gotestsum"
|
default: "gotestsum"
|
||||||
|
|
@ -78,7 +81,7 @@ commands:
|
||||||
- run: ./scripts/install_gotestsum.sh << parameters.os >> << parameters.gotestsum >>
|
- run: ./scripts/install_gotestsum.sh << parameters.os >> << parameters.gotestsum >>
|
||||||
- run: |
|
- run: |
|
||||||
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
|
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
|
||||||
./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- -short $PACKAGE_NAMES
|
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- -short $PACKAGE_NAMES
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: test-results
|
path: test-results
|
||||||
- when:
|
- when:
|
||||||
|
|
@ -166,6 +169,28 @@ jobs:
|
||||||
root: '/go'
|
root: '/go'
|
||||||
paths:
|
paths:
|
||||||
- '*'
|
- '*'
|
||||||
|
test-go-linux-386:
|
||||||
|
executor: go-1_17
|
||||||
|
parallelism: 4
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
||||||
|
- check-changed-files-or-halt
|
||||||
|
- run: 'GOARCH=386 make deps'
|
||||||
|
- run: 'GOARCH=386 make tidy'
|
||||||
|
- run: 'GOARCH=386 make check'
|
||||||
|
- test-go:
|
||||||
|
arch: "386"
|
||||||
|
- save_cache:
|
||||||
|
name: 'go module cache'
|
||||||
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
||||||
|
paths:
|
||||||
|
- '/go/pkg/mod'
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: '/go'
|
||||||
|
paths:
|
||||||
|
- '*'
|
||||||
test-go-mac:
|
test-go-mac:
|
||||||
executor: mac
|
executor: mac
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -415,6 +440,10 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
- 'test-go-linux-386':
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /.*/
|
||||||
- 'test-go-mac':
|
- 'test-go-mac':
|
||||||
filters:
|
filters:
|
||||||
tags: # only runs on tags if you specify this filter
|
tags: # only runs on tags if you specify this filter
|
||||||
|
|
@ -443,7 +472,7 @@ workflows:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- 'i386-package':
|
- 'i386-package':
|
||||||
requires:
|
requires:
|
||||||
- 'test-go-linux'
|
- 'test-go-linux-386'
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
|
@ -585,6 +614,7 @@ workflows:
|
||||||
nightly:
|
nightly:
|
||||||
jobs:
|
jobs:
|
||||||
- 'test-go-linux'
|
- 'test-go-linux'
|
||||||
|
- 'test-go-linux-386'
|
||||||
- 'test-go-mac'
|
- 'test-go-mac'
|
||||||
- 'test-go-windows'
|
- 'test-go-windows'
|
||||||
- 'windows-package':
|
- 'windows-package':
|
||||||
|
|
@ -606,7 +636,7 @@ workflows:
|
||||||
name: 'i386-package-nightly'
|
name: 'i386-package-nightly'
|
||||||
nightly: true
|
nightly: true
|
||||||
requires:
|
requires:
|
||||||
- 'test-go-linux'
|
- 'test-go-linux-386'
|
||||||
- 'ppc64le-package':
|
- 'ppc64le-package':
|
||||||
name: 'ppc64le-package-nightly'
|
name: 'ppc64le-package-nightly'
|
||||||
nightly: true
|
nightly: true
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,10 @@ func TestPhpFpmDefaultGetFromLocalhost(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPhpFpmGeneratesMetrics_Throw_Error_When_Fpm_Status_Is_Not_Responding(t *testing.T) {
|
func TestPhpFpmGeneratesMetrics_Throw_Error_When_Fpm_Status_Is_Not_Responding(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("Skipping long test in short mode")
|
||||||
|
}
|
||||||
|
|
||||||
r := &phpfpm{
|
r := &phpfpm{
|
||||||
Urls: []string{"http://aninvalidone"},
|
Urls: []string{"http://aninvalidone"},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ func TestAddNoiseOverflowCheck(t *testing.T) {
|
||||||
input: []telegraf.Metric{
|
input: []telegraf.Metric{
|
||||||
testutil.MustMetric("underflow_int64",
|
testutil.MustMetric("underflow_int64",
|
||||||
map[string]string{},
|
map[string]string{},
|
||||||
map[string]interface{}{"value": math.MinInt64},
|
map[string]interface{}{"value": int64(math.MinInt64)},
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
testutil.MustMetric("underflow_uint64_1",
|
testutil.MustMetric("underflow_uint64_1",
|
||||||
|
|
@ -207,7 +207,7 @@ func TestAddNoiseOverflowCheck(t *testing.T) {
|
||||||
expected: []telegraf.Metric{
|
expected: []telegraf.Metric{
|
||||||
testutil.MustMetric("underflow_int64",
|
testutil.MustMetric("underflow_int64",
|
||||||
map[string]string{},
|
map[string]string{},
|
||||||
map[string]interface{}{"value": math.MinInt64},
|
map[string]interface{}{"value": int64(math.MinInt64)},
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
testutil.MustMetric("underflow_uint64_1",
|
testutil.MustMetric("underflow_uint64_1",
|
||||||
|
|
@ -228,12 +228,12 @@ func TestAddNoiseOverflowCheck(t *testing.T) {
|
||||||
input: []telegraf.Metric{
|
input: []telegraf.Metric{
|
||||||
testutil.MustMetric("overflow_int64",
|
testutil.MustMetric("overflow_int64",
|
||||||
map[string]string{},
|
map[string]string{},
|
||||||
map[string]interface{}{"value": math.MaxInt64},
|
map[string]interface{}{"value": int64(math.MaxInt64)},
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
testutil.MustMetric("overflow_uint",
|
testutil.MustMetric("overflow_uint",
|
||||||
map[string]string{},
|
map[string]string{},
|
||||||
map[string]interface{}{"value": uint(math.MaxUint)},
|
map[string]interface{}{"value": uint64(math.MaxUint)},
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
testutil.MustMetric("overflow_uint64",
|
testutil.MustMetric("overflow_uint64",
|
||||||
|
|
@ -245,12 +245,12 @@ func TestAddNoiseOverflowCheck(t *testing.T) {
|
||||||
expected: []telegraf.Metric{
|
expected: []telegraf.Metric{
|
||||||
testutil.MustMetric("overflow_int64",
|
testutil.MustMetric("overflow_int64",
|
||||||
map[string]string{},
|
map[string]string{},
|
||||||
map[string]interface{}{"value": math.MaxInt64},
|
map[string]interface{}{"value": int64(math.MaxInt64)},
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
testutil.MustMetric("overflow_uint",
|
testutil.MustMetric("overflow_uint",
|
||||||
map[string]string{},
|
map[string]string{},
|
||||||
map[string]interface{}{"value": uint(math.MaxUint)},
|
map[string]interface{}{"value": uint64(math.MaxUint)},
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
testutil.MustMetric("overflow_uint64",
|
testutil.MustMetric("overflow_uint64",
|
||||||
|
|
@ -259,7 +259,7 @@ func TestAddNoiseOverflowCheck(t *testing.T) {
|
||||||
time.Unix(0, 0),
|
time.Unix(0, 0),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
distribution: &testDistribution{value: 1.0},
|
distribution: &testDistribution{value: 0.0},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "non-numeric fields",
|
name: "non-numeric fields",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue