profile
viewpoint
Andrew Martin sublimino @controlplaneio London, UK https://control-plane.io @controlplaneio

aquasecurity/kube-hunter 2431

Hunt for security weaknesses in Kubernetes clusters

controlplaneio/kubesec 350

Security risk analysis for Kubernetes resources

sublimino/awesome-funny-markov 167

A curated list of delightfully amusing and facetious Markov chain output.

kris-nova/bashernetes 16

A Kubernetes implementation in bash (srsly)

chaosiq/demos 14

Demos of discovering weaknesses in various systems

sublimino/Capsule 1

Realtime web app framework for Backbone, socket.io and node.js

controlplaneio/jenkins-shared-library 0

Jenkins Shared Library for demonstration purposes.

lukebond/tim-test 0

Repository for teaching Git & Github to a friend

Pull request review commentjenkinsci/in-toto-plugin

Bump deps

 org.bouncycastle.asn1.DERNull org.bouncycastle.asn1.DERBitString org.bouncycastle.asn1.pkcs.PrivateKeyInfo org.bouncycastle.asn1.DEROctetString+org.bouncycastle.crypto.CipherParameters

This is my attempt to fix it at the time I raised #17, which AFAICS did not do so (builds fail with my version of this plugin for the reason linked in #17).

adityasaky

comment created time in 3 days

PullRequestReviewEvent

push eventcontrolplaneio/jenkins-shared-library

Andrew Martin

commit sha f0b6c29a6168496800992041ccd83009785a9184

fix: remove simplePipeline example

view details

push time in 4 days

create barnchcontrolplaneio/netassert

branch : upgrade-and-test-node-bits

created branch time in 4 days

push eventcontrolplaneio/docker-gcloud-sdk

Andrew Martin

commit sha 0c69448ea9d3cda4f8e117da15c65aed30492f4f

build: use buildkit

view details

push time in 4 days

push eventcontrolplaneio/docker-gcloud-sdk

Andrew Martin

commit sha 53b5ebec4bb720817ff900d07e0b37691bc34816

feat: update dependencies

view details

push time in 4 days

push eventbats-core/bats-core

Martin Schulze

commit sha b6f8f322b65f9db88533a45d4e151440318f0f23

fix: ensure tabs in filename are no problem

view details

Martin Schulze

commit sha 05439a14c3da097255962fe6b8248354db054c23

fix: test that files are really evaluated n+1 times

view details

Martin Schulze

commit sha befdb3501a15307e252c23d73f96748807868741

Avoid spurious failure on non english locales

view details

Martin Schulze

commit sha c7f2a8d399cccd4557e5912143bef5190492103a

Only test tabs on filesystems that can use them

view details

Martin Schulze

commit sha f2c3612225e58a25796293dfbc47026db5ed5370

fix: fix error on MacOS

view details

Andrew Martin

commit sha 9f8e33a98b14c7c925755750bb9dae18776bd78a

fix: add command to empty test

view details

Andrew Martin

commit sha 18f574c0deaa3f0299fa7aa1120c61f9fb430ad8

Merge pull request #348 from martin-schulze-vireso/feature/cleanup Small cleanups

view details

push time in 5 days

PR merged bats-core/bats-core

Small cleanups
+50 -9

2 comments

6 changed files

martin-schulze-vireso

pr closed time in 5 days

PR closed bats-core/bats-core

Prevent #290 Debian/GNU parallel regression

Testing fixes for #297 on Debian

+6 -0

0 comment

1 changed file

sublimino

pr closed time in 5 days

pull request commentbats-core/bats-core

Small cleanups

Thank you @martin-schulze-vireso :pray:

martin-schulze-vireso

comment created time in 5 days

push eventmartin-schulze-vireso/bats-core

Andrew Martin

commit sha 9f8e33a98b14c7c925755750bb9dae18776bd78a

fix: add command to empty test

view details

push time in 5 days

startedskeeto/endlessh

started time in 5 days

push eventraoulmillais/netassert

Andrew Martin

commit sha 13bde3fb3714a4f0feaab9612b9f0381c49bf0d9

test: remove some domains from test

view details

Andrew Martin

commit sha 7b6087a792da78235ffbe7e0d741732880731cd9

build: remove cluster if exists

view details

push time in 5 days

push eventraoulmillais/netassert

Andrew Martin

commit sha 4a9785eb88b1ad143a5f5a6fd6560f48ae7407c8

fix: debug handoff from script to node - add TAP-compliant comments - remove erroneous local port test

view details

Andrew Martin

commit sha 63e98573f28b0ec67e1c57c067167662ca32aaef

feat: add verbose logging to tests, concurrency of 2

view details

Andrew Martin

commit sha 80abb2da8d64917c194dd9bf1b5387d33a6a8ea4

feat: upgrade cluster bootstrap - also delete k8s resources - fix js syntax

view details

push time in 5 days

push eventraoulmillais/netassert

Andrew Martin

commit sha 06db2d9e760105a1379c520bbf16933bfe3b2569

fix: run netassert-test.js instead of netassert.js - fail if no tests - fix undefined in test name

view details

push time in 6 days

starteddhuseby/did-git-spec

started time in 6 days

push eventcontrolplaneio/docker-base-images

Andrew Martin

commit sha db5311f621fff779651742305546a47f93f26077

fix: always pull, enable hadolint Docker build --pull

view details

push time in 7 days

push eventcontrolplaneio/docker-base-images

Andrew Martin

commit sha 0a3ad283756fd8749238076aa92c033cd5d01851

feat: explicit configuration Most of these steps should eventually default to true

view details

push time in 7 days

push eventcontrolplaneio/jenkins-shared-library

Andrew Martin

commit sha 1c909fac3952dbe6c4d4aebc95ef1b7efbb20712

fix: correct Docker hub org

view details

push time in 7 days

starteditchyny/gojq

started time in 7 days

push eventcontrolplaneio/jenkins-shared-library

Andrew Martin

commit sha f646cab96d59085a38d761e37c645b5d578f29b5

refactor: use latest tag in dev

view details

push time in 7 days

push eventcontrolplaneio/docker-base-images

Andrew Martin

commit sha b1ea20e6f99f54fdcfbaaffb25f06719a67d7126

fix: pull base images

view details

push time in 7 days

push eventcontrolplaneio/docker-base-images

Andrew Martin

commit sha ce40aff5f689b58fa1edf5048216f7004c976550

fix: make build steps

view details

Andrew Martin

commit sha 2d841d280ed10b72894825b24d3dc9a64abb85f0

feat: use jenkins-shared-library

view details

push time in 7 days

push eventcontrolplaneio/jenkins-shared-library

Andrew Martin

commit sha 5198db5b2f4137ae19753081127470647f0cd1d3

feat: container push build stage

view details

push time in 7 days

push eventcontrolplaneio/cp-jenkins

Andrew Martin

commit sha 25741d8290a290d5552193ba0a82fb48c292bcb0

feat: add in-toto

view details

push time in 7 days

pull request commentcontrolplaneio/kubesec

Fix code quality issues

Thanks for the contribution @sourya-deepsource!

As you've taken the time to integrate, we'll keep Deepsource in for now to try it out and compare it, and raise an issue to compare it to others in the future.

Thanks! :tada:

sourya-deepsource

comment created time in 8 days

startedfadado/jqt

started time in 8 days

PullRequestReviewEvent

push eventmartin-schulze-vireso/bats-core

Ritesh Yadav

commit sha 05a1e7fade9c4faa39ccb6945b089540d7b20c61

fix: includes lib in the npm package installation

view details

Andrew Martin

commit sha 14d195cf0438b54e866e3f2fd11e3b38985bd350

Merge pull request #352 from Ritesh-Yadav/fix-package-json fix: includes lib in the npm package installation

view details

Martin Schulze

commit sha a413045286b9238a9c2304e0faa65a1d4b393b24

Ensure we don't start all semaphores at once

view details

Martin Schulze

commit sha addeb49cbcb016eee37b1abb259c1f599a921a2c

Don't fork test as fast as possible also print results as early as possible

view details

Martin Schulze

commit sha f4bd4f9589edad1828a420edd1eff2787c7d941b

Add --dont-parallelize-across-files for faster output since parallel --keep-order will block until the command has finished

view details

Martin Schulze

commit sha 5f7a18f9ece68716694c0b748f0cd617dd8ee875

fallback to polling when tail does't support --pid

view details

Martin Schulze

commit sha 48ecb5c13db2bdb9cb5241a8ef47177b8c698177

Avoid spurious failures on too tight timing with the new output mechanics, latencies might add up.

view details

Martin Schulze

commit sha ab544f1c700795a41ea70631f16edf4f2f5f0de7

Document --no-parallelize-across-files

view details

Martin Schulze

commit sha a023a390acccfb8815e3bc5f395cb68d068ad532

Add configurable timeout for parallel tests

view details

Martin Schulze

commit sha 1c62fc9ba8bed24fda887adb87a7b92f0994fba7

Fix shellcheck errors/warnings

view details

Martin Schulze

commit sha 3ed95c415ae164e2c014691fa7417646248100b2

Implement & use semaphores in bash

view details

Martin Schulze

commit sha 0a24927140f2023d3919dde6b2ca9dc7a0260964

Fix todo

view details

Martin Schulze

commit sha 6fdaa6ddea9a2090e42e5c723a1257c6eb64ea1a

Fix for shellcheck

view details

Martin Schulze

commit sha 9e7982566474fe86e6b62852770225ea3371c83e

Return correct status in parallel execution

view details

Martin Schulze

commit sha 857bcf4649c3cbb166eafe5801cf0c3282af4e53

Use fixed slot names for semaphores this avoids dealing with pids

view details

Martin Schulze

commit sha 77a1c9d45d821c8450f4252037f4f6d2f873a920

Fix shellcheck

view details

Martin Schulze

commit sha 0a49aeced0b98349ae25e1830073764647f74f13

Run test suite in parallel too

view details

Martin Schulze

commit sha d31fa6d8a71b14cb9fc399a6e0c466f50e8fc122

Allow parallel tests: Only check for own subprocesses when running in parallel, other processes might spawn the same tests. This would trip up the count.

view details

Martin Schulze

commit sha 3026c54b999863bd9c9425e1e20652654e4b2f0d

Make test suite runnable in parallel

view details

Martin Schulze

commit sha 976f1fb1b67e7da9e1206a8150df13d5b4301f72

parallel mode: Forward failure return code correctly

view details

push time in 9 days

pull request commentbats-core/bats-core

WIP: Allow for output format to differ between stdout and report file

I've added a commit, this looks great.

One question is flag names, currently --formatter and --report. Should the latter be --reporter?

I also think the -help text has got messy, I'll get round to cleaning that up.

martin-schulze-vireso

comment created time in 9 days

push eventmartin-schulze-vireso/bats-core

Andrew Martin

commit sha 2f0151678546455f397f3e98d00e4ddf8d55e2a4

fix: add tap13 formatter and help text

view details

push time in 9 days

push eventmartin-schulze-vireso/bats-core

Andrew Martin

commit sha 20ff78bfad63fd744258143c9dbae56cf7b7673c

fix: add tap13 formatter and help text

view details

push time in 9 days

push eventmartin-schulze-vireso/bats-core

Ritesh Yadav

commit sha 05a1e7fade9c4faa39ccb6945b089540d7b20c61

fix: includes lib in the npm package installation

view details

Andrew Martin

commit sha 14d195cf0438b54e866e3f2fd11e3b38985bd350

Merge pull request #352 from Ritesh-Yadav/fix-package-json fix: includes lib in the npm package installation

view details

Martin Schulze

commit sha a413045286b9238a9c2304e0faa65a1d4b393b24

Ensure we don't start all semaphores at once

view details

Martin Schulze

commit sha addeb49cbcb016eee37b1abb259c1f599a921a2c

Don't fork test as fast as possible also print results as early as possible

view details

Martin Schulze

commit sha f4bd4f9589edad1828a420edd1eff2787c7d941b

Add --dont-parallelize-across-files for faster output since parallel --keep-order will block until the command has finished

view details

Martin Schulze

commit sha 5f7a18f9ece68716694c0b748f0cd617dd8ee875

fallback to polling when tail does't support --pid

view details

Martin Schulze

commit sha 48ecb5c13db2bdb9cb5241a8ef47177b8c698177

Avoid spurious failures on too tight timing with the new output mechanics, latencies might add up.

view details

Martin Schulze

commit sha ab544f1c700795a41ea70631f16edf4f2f5f0de7

Document --no-parallelize-across-files

view details

Martin Schulze

commit sha a023a390acccfb8815e3bc5f395cb68d068ad532

Add configurable timeout for parallel tests

view details

Martin Schulze

commit sha 1c62fc9ba8bed24fda887adb87a7b92f0994fba7

Fix shellcheck errors/warnings

view details

Martin Schulze

commit sha 3ed95c415ae164e2c014691fa7417646248100b2

Implement & use semaphores in bash

view details

Martin Schulze

commit sha 0a24927140f2023d3919dde6b2ca9dc7a0260964

Fix todo

view details

Martin Schulze

commit sha 6fdaa6ddea9a2090e42e5c723a1257c6eb64ea1a

Fix for shellcheck

view details

Martin Schulze

commit sha 9e7982566474fe86e6b62852770225ea3371c83e

Return correct status in parallel execution

view details

Martin Schulze

commit sha 857bcf4649c3cbb166eafe5801cf0c3282af4e53

Use fixed slot names for semaphores this avoids dealing with pids

view details

Martin Schulze

commit sha 77a1c9d45d821c8450f4252037f4f6d2f873a920

Fix shellcheck

view details

Martin Schulze

commit sha 0a49aeced0b98349ae25e1830073764647f74f13

Run test suite in parallel too

view details

Martin Schulze

commit sha d31fa6d8a71b14cb9fc399a6e0c466f50e8fc122

Allow parallel tests: Only check for own subprocesses when running in parallel, other processes might spawn the same tests. This would trip up the count.

view details

Martin Schulze

commit sha 3026c54b999863bd9c9425e1e20652654e4b2f0d

Make test suite runnable in parallel

view details

Martin Schulze

commit sha 976f1fb1b67e7da9e1206a8150df13d5b4301f72

parallel mode: Forward failure return code correctly

view details

push time in 9 days

push eventbats-core/bats-core

Martin Schulze

commit sha 2d71ab43b083a5b783fb6e84471dee59e070955e

Measure test durations in milliseconds

view details

Martin Schulze

commit sha 93121953f22dca603410f5cc0ce0b0ec89d8fe80

Add TAP13 formatter

view details

Martin Schulze

commit sha 75a288bc098fe119c89a6415e8dcaf934c3ad470

Document --formatter tap13

view details

Martin Schulze

commit sha b3357f9d173ebaca32139f8816c566960284c6ad

pretty formatter: Increase visibility of timing info by giving it another color

view details

Andrew Martin

commit sha 126a09484c8aaa1e314b939162cff30254e0b707

fix: shellcheck errors

view details

Andrew Martin

commit sha b705e05471dd5d93617b05c16620fd4971f8de6b

Merge pull request #337 from martin-schulze-vireso/feature/tap_compliant_timing TAP13 compliant timing

view details

push time in 9 days

PR merged bats-core/bats-core

TAP13 compliant timing

This is a loos port of #127 to the current code layout.

Features:

  • measuring tests in ms (instead of (integer!) seconds as before)

  • adding a TAP13 formatter to avoid having to maintain multiple formats in the internals

  • [x] I have reviewed the Contributor Guidelines.

  • [x] I have reviewed the Code of Conduct and agree to abide by it

+126 -29

3 comments

10 changed files

martin-schulze-vireso

pr closed time in 9 days

pull request commentbats-core/bats-core

TAP13 compliant timing

Rebased master, fixed shellchecks, and signed commits, LGTM :D

More great work shipping features and fixes @martin-schulze-vireso, thank you :100:

martin-schulze-vireso

comment created time in 9 days

push eventmartin-schulze-vireso/bats-core

Andrew Martin

commit sha 126a09484c8aaa1e314b939162cff30254e0b707

fix: shellcheck errors

view details

push time in 9 days

push eventmartin-schulze-vireso/bats-core

Martin Schulze

commit sha 46a82dac037e421e0921ee4e857f1501d3dc69b0

Fix wording about visibility of setup_file vars Fixes #330

view details

Martin Schulze

commit sha 9f1e042af8ca39392987e2e2239d2c45f54ad988

Remove unnecessary flag in --formatter junit docs Fixes #328

view details

Andrew Martin

commit sha 135ee73bf13059fa47cdc290dfd5553c2ca81110

Merge pull request #333 from martin-schulze-vireso/patch-2 Fix wording about visibility of setup_file vars

view details

Andrew Martin

commit sha f494abff1cb8cf47f88d00a0be78bc0b10671ec1

Merge pull request #334 from martin-schulze-vireso/patch-3 Remove unnecessary -T flag in --formatter junit docs

view details

Martin Schulze

commit sha e57a7e0f76f35553fe177683ee57db6f61826d30

fix: avoid running duplicate files' tests n^2 times - fixes #329

view details

Andrew Martin

commit sha 83346e1c3e8fadc34ddb1be3f0826cf338f5e259

Merge pull request #338 from martin-schulze-vireso/bugfix/issue-329 Avoid running duplicate files' tests n^2 times

view details

Martin Schulze

commit sha a9a86484555ba096164201f32c3cf4ad971095ea

perf: don't preprocess source per test this should be done once per file

view details

Andrew Martin

commit sha da118fd72ddc9be362e5ef65e442db54e9cc7b84

Merge pull request #335 from martin-schulze-vireso/feature/dont_preprocess_for_every_test Improve performance: Don't preprocess per test

view details

Kir Kolyshkin

commit sha 71086e6903f67e1c77887f85fcaefb237165a43a

README: add examples of overusing `run` In some cases `run` is used excessively, resulting in a longer and less readable code. Add a few such examples together with recommendations.

view details

Andrew Martin

commit sha cd1a896acfc61d8acb1543882d858758c81cf1ed

Merge pull request #343 from kolyshkin/patch-1 README: add examples of overusing `run`

view details

Martin Schulze

commit sha 9b2b659e5ba769752c0d00dadb3ad9b58f59cbaa

fix: don't use unbound variables in setup methods - fixes #340

view details

Andrew Martin

commit sha 96e56fe54871a336acc083b9129b6a2351e7f04b

Merge pull request #344 from martin-schulze-vireso/bugfix/issue-340 Fix unbound variable in skip

view details

Martin Schulze

commit sha 829e628639b0480d4d2a2ebf1ac6f820cf4c0f3b

fix: make BATS_TEST_NUMBER count per file again - fixes #322 - add and document BATS_GLOBAL_TEST_NUMBER

view details

Martin Schulze

commit sha 392216fca5eb312ba412bd2ff77ab6a71086c3d9

Improve variable names according to review

view details

Martin Schulze

commit sha 54a6b05d2a47bed66f14b57b072fa5f657a8abdd

Fix wrong test number on teardown_file the visibility of test_number_in_suite to traps was wrong

view details

Martin Schulze

commit sha 255d49dd9e1e9083fe836e750ed668276beca20b

Simplify usage of test_number_in_file

view details

Martin Schulze

commit sha 01effdab091fe9bee89f8e3afa9e2e44a597da69

Add comment about idiosyncratic code

view details

Martin Schulze

commit sha aeabe350c5b4bfbc0c8fc1bedc4c03ad13daffc9

Configure bashver for devcontainer

view details

Martin Schulze

commit sha 95364cff4c9a304957be37e7047462aa46fcb9e4

Fix shellcheck errors, let shellcheck fail travis

view details

Martin Schulze

commit sha c66ab4557629f7baad32cee4e198536c0a95cab8

Fix wording to be in sync with manpage

view details

push time in 9 days

push eventbats-core/bats-core

Tycho Andersen

commit sha 864346fd92e3b5d4f6ef3f806658f0134ac85f6f

test: fix parallel preserve environment variables test with --jobs 1, bats never actually uses parallel, so this test doesn't test the parallel path. Change this to --jobs 2, so that we actually test the thing we want to test. Signed-off-by: Tycho Andersen <tycho@tycho.ws>

view details

Tycho Andersen

commit sha 988d96523a4162a1b43e07354f83934dbccbbc79

parallel: drop --parallel-preserve environment but leave it as an undocumented flag, so that peoples script's don't break if they already pass it. This is parallel's default behavior, so no need to do the confusing song and dance about --record-env. Quoting Martin Schulze from PR #324: I read up again on env_parallel. I think the documentation is a bit misleading: There is no --env env_parallel, they want you to use the "alias" env_parallel instead of parallel. Then I wondered why does your test work when this is not the correct option? I read more about what the whole --env ... business is about in the documentation and now I think I understand: The env handling is made this explicit because GNU parallel offers parallelization accross servers. Obviously, they need not share the same environment and copying can be costly. With that I mind I revisited what I had done: While skimming the documentation, that env_parallel mention got me thinking that they somehow discard the environment when using normal parallel (which is kind of true in the server case), so I added the --parallel-preserve-environment option. However, we are parallelizing on the same machine as a subprocess, so we inherit the full environment anyways. I just verified this with a short test. Look ma, no --envs: $ parallel echo "VAR: $TEST \$" ::: 1 2 VAR: $ 1 VAR: $ 2 $ TEST=bla $ parallel echo "VAR: $TEST \$" ::: 1 2 VAR: bla $ 1 VAR: bla $ 2 This makes all of the (explicit) environment handling moot because the environment already is preserved by default. Signed-off-by: Tycho Andersen <tycho@tycho.ws>

view details

Andrew Martin

commit sha bf9db8d42a7d057daaab395fc2b98bc68b842c05

Merge pull request #324 from tych0/preserve-environment-by-default parallel: preserve environment by default

view details

push time in 9 days

PR merged bats-core/bats-core

parallel: preserve environment by default

Along with parallel's --env _ feature, there's an --env env_parallel feature, which just propagates whatever is in the current environment.

Let's do this by default to not violate the principle of least surprise, but retain the old functionality for people who want to use ignored_vars.

Signed-off-by: Tycho Andersen tycho@tycho.ws

+7 -35

18 comments

6 changed files

tych0

pr closed time in 9 days

PullRequestReviewEvent

push eventtych0/bats-core

Stefan Lasiewski

commit sha ca4730718c8cd42cd69361dcb36ff27d6517b084

Minor fix: Fix broken link to "File Descriptor 3" Fix broken link to #file-descriptor-3-read-this-if-bats-hangs

view details

Andrew Martin

commit sha 5ae6d46b12cb0abbb66a55c121f8aa83b4e3fbe5

feat: add semver library from fsaintjacques https://github.com/fsaintjacques/semver-tool

view details

Andrew Martin

commit sha a83eb75f5e0cb24f3b3673f0563c2976a1a4974e

build: add release script

view details

Andrew Martin

commit sha 603da228cb2ac3ef8e85c134b947f4eeb34d9b00

build: tooling from bats v1.2.1 release

view details

Andrew Martin

commit sha dcaec03e32e0b152f8ef9cf14b75296cf5caeaff

feat: release Bats v1.2.1

view details

Andrew Martin

commit sha 08401c6481dca4bdfb5fd26efaad0c308c288bb0

Merge pull request #301 from stefanlasiewski/patch-1 Minor doc fix: Fix broken link to "File Descriptor 3"

view details

Ryan William O'Hara

commit sha b7e0923c0c447da6c68d0ef41efae74cdca8df8f

docs: update Wiki link on Examples page The current link brings you to this invalid page that will 404: https://github.com/bats-core/bats-core/blob/master/docs/examples/(/bats-core/bats-core/wiki/Examples)

view details

Andrew Martin

commit sha 77d1e8369b9ac605f0467dfb831046ea8651de3c

Merge pull request #331 from ryanwohara/fix-examples-link Update the link to the Wiki from the Examples page

view details

Alex Thiessen

commit sha 5d88c47485d478ff8637ad2e68fb355ca78c85d2

test/bats: Test that `load` supports plain symbols Only function `load`ing is tested so far, take variables (plain and arrays) into account, too.

view details

Alex Thiessen

commit sha f54c998e5c8ae1acee63939275f97645871852bf

test/bats: Test that `load` doesn't support `declare`d symbols Only function and plainly defined variable `load`ing is tested so far, take `declare`d variables (plain and arrays) into account, too. All assertions of the new test are negated because `declare`d symbols aren't supported by `load`, docs will be updated accordingly in a separate commit.

view details

Alex Thiessen

commit sha fde4ab0099045846e88f9c070e377ee5343a0590

README: Describe that `load` doesn't support `declare`d symbols. The `load` function has a caveat, document it. Fixes https://github.com/bats-core/bats-core/issues/268

view details

Andrew Martin

commit sha c7d99c3b05fe8bdbc8327e8e6ef744db42e7c737

Merge pull request #332 from rico-chet/describe-limits-of-load Describe limits of `load`

view details

Martin Schulze

commit sha 46a82dac037e421e0921ee4e857f1501d3dc69b0

Fix wording about visibility of setup_file vars Fixes #330

view details

Martin Schulze

commit sha 9f1e042af8ca39392987e2e2239d2c45f54ad988

Remove unnecessary flag in --formatter junit docs Fixes #328

view details

Andrew Martin

commit sha 135ee73bf13059fa47cdc290dfd5553c2ca81110

Merge pull request #333 from martin-schulze-vireso/patch-2 Fix wording about visibility of setup_file vars

view details

Andrew Martin

commit sha f494abff1cb8cf47f88d00a0be78bc0b10671ec1

Merge pull request #334 from martin-schulze-vireso/patch-3 Remove unnecessary -T flag in --formatter junit docs

view details

Martin Schulze

commit sha e57a7e0f76f35553fe177683ee57db6f61826d30

fix: avoid running duplicate files' tests n^2 times - fixes #329

view details

Andrew Martin

commit sha 83346e1c3e8fadc34ddb1be3f0826cf338f5e259

Merge pull request #338 from martin-schulze-vireso/bugfix/issue-329 Avoid running duplicate files' tests n^2 times

view details

Martin Schulze

commit sha a9a86484555ba096164201f32c3cf4ad971095ea

perf: don't preprocess source per test this should be done once per file

view details

Andrew Martin

commit sha da118fd72ddc9be362e5ef65e442db54e9cc7b84

Merge pull request #335 from martin-schulze-vireso/feature/dont_preprocess_for_every_test Improve performance: Don't preprocess per test

view details

push time in 9 days

pull request commentbats-core/bats-core

Fix hangs on CTRL-C

Rapid bugfix, thanks @martin-schulze-vireso! :tada:

martin-schulze-vireso

comment created time in 9 days

push eventbats-core/bats-core

Martin Schulze

commit sha 78d030b4ae83244de99faba353dfcd74ce012cd1

Add reproducer for #353

view details

Martin Schulze

commit sha 28acac2fb00348254452496363e9d0b19b0b1daa

Fix #353 (CTRL-C a `run command` hangs)

view details

Martin Schulze

commit sha a26c702cc281a672e4c6485b534633e6ed014c65

Make abort test more strict on truly aborting The previous version did not fail when we simply finished due to the test being done.

view details

Andrew Martin

commit sha f6790ee3d90f1f6d62f7955daaaa3509d9b53853

Merge pull request #354 from martin-schulze-vireso/bugfix/issue-353-hang-on-ctrl-c Fix hangs on CTRL-C

view details

push time in 9 days

PR merged bats-core/bats-core

Fix hangs on CTRL-C

Fixes #353

+29 -1

0 comment

4 changed files

martin-schulze-vireso

pr closed time in 9 days

issue closedbats-core/bats-core

ctrl+c causes bats to hang

Running bats v1.2.1 on ubuntu 20.04. If I want to kill a run early, and I hit ctrl+c, the process just gets stuck. I end up having to ctrl+z to put in the background, then find the bash process and kill it.

Is there another interrupt that should be used to kill it mid-run?

closed time in 9 days

kaysond

push eventmartin-schulze-vireso/bats-core

Martin Schulze

commit sha 78d030b4ae83244de99faba353dfcd74ce012cd1

Add reproducer for #353

view details

Martin Schulze

commit sha 28acac2fb00348254452496363e9d0b19b0b1daa

Fix #353 (CTRL-C a `run command` hangs)

view details

Martin Schulze

commit sha a26c702cc281a672e4c6485b534633e6ed014c65

Make abort test more strict on truly aborting The previous version did not fail when we simply finished due to the test being done.

view details

push time in 9 days

push eventbats-core/bats-core

Martin Schulze

commit sha a413045286b9238a9c2304e0faa65a1d4b393b24

Ensure we don't start all semaphores at once

view details

Martin Schulze

commit sha addeb49cbcb016eee37b1abb259c1f599a921a2c

Don't fork test as fast as possible also print results as early as possible

view details

Martin Schulze

commit sha f4bd4f9589edad1828a420edd1eff2787c7d941b

Add --dont-parallelize-across-files for faster output since parallel --keep-order will block until the command has finished

view details

Martin Schulze

commit sha 5f7a18f9ece68716694c0b748f0cd617dd8ee875

fallback to polling when tail does't support --pid

view details

Martin Schulze

commit sha 48ecb5c13db2bdb9cb5241a8ef47177b8c698177

Avoid spurious failures on too tight timing with the new output mechanics, latencies might add up.

view details

Martin Schulze

commit sha ab544f1c700795a41ea70631f16edf4f2f5f0de7

Document --no-parallelize-across-files

view details

Martin Schulze

commit sha a023a390acccfb8815e3bc5f395cb68d068ad532

Add configurable timeout for parallel tests

view details

Martin Schulze

commit sha 1c62fc9ba8bed24fda887adb87a7b92f0994fba7

Fix shellcheck errors/warnings

view details

Martin Schulze

commit sha 3ed95c415ae164e2c014691fa7417646248100b2

Implement & use semaphores in bash

view details

Martin Schulze

commit sha 0a24927140f2023d3919dde6b2ca9dc7a0260964

Fix todo

view details

Martin Schulze

commit sha 6fdaa6ddea9a2090e42e5c723a1257c6eb64ea1a

Fix for shellcheck

view details

Martin Schulze

commit sha 9e7982566474fe86e6b62852770225ea3371c83e

Return correct status in parallel execution

view details

Martin Schulze

commit sha 857bcf4649c3cbb166eafe5801cf0c3282af4e53

Use fixed slot names for semaphores this avoids dealing with pids

view details

Martin Schulze

commit sha 77a1c9d45d821c8450f4252037f4f6d2f873a920

Fix shellcheck

view details

Martin Schulze

commit sha 0a49aeced0b98349ae25e1830073764647f74f13

Run test suite in parallel too

view details

Martin Schulze

commit sha d31fa6d8a71b14cb9fc399a6e0c466f50e8fc122

Allow parallel tests: Only check for own subprocesses when running in parallel, other processes might spawn the same tests. This would trip up the count.

view details

Martin Schulze

commit sha 3026c54b999863bd9c9425e1e20652654e4b2f0d

Make test suite runnable in parallel

view details

Martin Schulze

commit sha 976f1fb1b67e7da9e1206a8150df13d5b4301f72

parallel mode: Forward failure return code correctly

view details

Martin Schulze

commit sha cc1f165523b7ff6e9a584b4ab998d21eb8958c9c

Don't rely on pstree, it is too platformdependent

view details

Martin Schulze

commit sha 94ab69e878f91bd51037b403a683427dc7b766a0

Add env var BATS_NUMBER_OF_PARALLEL_JOBS to configure num_jobs from the env. Overridden by supplying --jobs on the cli.

view details

push time in 9 days

PR merged bats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

My system has gone down while trying to measure a parallel run of 4000 tests in a file. After some debugging I noticed a lot of processes piling up. The issue was that GNU parallel's semaphores were started as background tasks. In this case we won't block until the semaphore run actually gets a free slot and just start the next one.

I restructured the code to take advantage of semaphore's waiting. Unfortunately, that complicates the return code handling.

In the process of this I also updated the output code to print test's results as soon as they are finished (but still in order!). To debug the parallelism I also needed to add the --dont-parallelize-across-files switch, as parallel --keep-order waits until a process has finished before the output is printed. This was problematic when the process never finishes due to deadlocks.

As these changes would conflict with #326 I rebased them on top of it. So we either land #326 first and rebase this or land this as is and close #326.

@sublimino Given the risk of crashing the running system with a large enough test file, I would recommend to give this high priority.

+558 -121

28 comments

19 changed files

martin-schulze-vireso

pr closed time in 9 days

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

Initial failure for Windows build in https://ci.appveyor.com/project/bats-core/bats-core/builds/35234999

image

Have re-run three times and seen no repeat, so a flake warning but merging anyway.

martin-schulze-vireso

comment created time in 9 days

PullRequestReviewEvent

issue commentbats-core/bats-core

Release bats 1.2 and subsequently 1.2.1

Hi @simeg, @jasonkarns is looking to push this to NPM sometime this week : ]

sublimino

comment created time in 9 days

push eventmartin-schulze-vireso/bats-core

Martin Schulze

commit sha a413045286b9238a9c2304e0faa65a1d4b393b24

Ensure we don't start all semaphores at once

view details

Martin Schulze

commit sha addeb49cbcb016eee37b1abb259c1f599a921a2c

Don't fork test as fast as possible also print results as early as possible

view details

Martin Schulze

commit sha f4bd4f9589edad1828a420edd1eff2787c7d941b

Add --dont-parallelize-across-files for faster output since parallel --keep-order will block until the command has finished

view details

Martin Schulze

commit sha 5f7a18f9ece68716694c0b748f0cd617dd8ee875

fallback to polling when tail does't support --pid

view details

Martin Schulze

commit sha 48ecb5c13db2bdb9cb5241a8ef47177b8c698177

Avoid spurious failures on too tight timing with the new output mechanics, latencies might add up.

view details

Martin Schulze

commit sha ab544f1c700795a41ea70631f16edf4f2f5f0de7

Document --no-parallelize-across-files

view details

Martin Schulze

commit sha a023a390acccfb8815e3bc5f395cb68d068ad532

Add configurable timeout for parallel tests

view details

Martin Schulze

commit sha 1c62fc9ba8bed24fda887adb87a7b92f0994fba7

Fix shellcheck errors/warnings

view details

Martin Schulze

commit sha 3ed95c415ae164e2c014691fa7417646248100b2

Implement & use semaphores in bash

view details

Martin Schulze

commit sha 0a24927140f2023d3919dde6b2ca9dc7a0260964

Fix todo

view details

Martin Schulze

commit sha 6fdaa6ddea9a2090e42e5c723a1257c6eb64ea1a

Fix for shellcheck

view details

Martin Schulze

commit sha 9e7982566474fe86e6b62852770225ea3371c83e

Return correct status in parallel execution

view details

Martin Schulze

commit sha 857bcf4649c3cbb166eafe5801cf0c3282af4e53

Use fixed slot names for semaphores this avoids dealing with pids

view details

Martin Schulze

commit sha 77a1c9d45d821c8450f4252037f4f6d2f873a920

Fix shellcheck

view details

Martin Schulze

commit sha 0a49aeced0b98349ae25e1830073764647f74f13

Run test suite in parallel too

view details

Martin Schulze

commit sha d31fa6d8a71b14cb9fc399a6e0c466f50e8fc122

Allow parallel tests: Only check for own subprocesses when running in parallel, other processes might spawn the same tests. This would trip up the count.

view details

Martin Schulze

commit sha 3026c54b999863bd9c9425e1e20652654e4b2f0d

Make test suite runnable in parallel

view details

Martin Schulze

commit sha 976f1fb1b67e7da9e1206a8150df13d5b4301f72

parallel mode: Forward failure return code correctly

view details

Martin Schulze

commit sha cc1f165523b7ff6e9a584b4ab998d21eb8958c9c

Don't rely on pstree, it is too platformdependent

view details

Martin Schulze

commit sha 94ab69e878f91bd51037b403a683427dc7b766a0

Add env var BATS_NUMBER_OF_PARALLEL_JOBS to configure num_jobs from the env. Overridden by supplying --jobs on the cli.

view details

push time in 9 days

PullRequestReviewEvent

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

Naming scheme just a nit, let's merge this! Any notes on the next merge to target @martin-schulze-vireso? Otherwise I'll appraise and try to work through (guess?) in a size-based order in case of merge conflicts.

martin-schulze-vireso

comment created time in 9 days

push eventmartin-schulze-vireso/bats-core

Andrew Martin

commit sha 4854209f38d623b079ccd8476f190efe908b2df2

fix: typo

view details

push time in 9 days

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

we do need a Mac implementation of this

I thought so. I'll see what I can do with shlock which seems to be preinstalled.

Sorry for the extra legwork. If it makes sense I'm happy to merge this so other PRs can be unblocked and merged today, and live with a parallel-broken master for few days?

I would like to see the bats internal test suite passing in parallel too

This is already part of the current PR. The travis runs inside the container do both a parallel and a sequential run.

I can't believe I missed this, and FANTASTIC! Works like a dream for me currently, will hammer it :+1:

martin-schulze-vireso

comment created time in 9 days

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

Minor nits (these can wait for another PR):

  • test_helper::cleanup_tmpdir — we should document or standardise helper function naming
  • man/bats.1 needs an update
  • in a perfect world the sleep 3s could be reduced, I don't know what race conditions have been seen so will not change it

Previous points:

the waiting/polling is somewhat inefficient and could be replaced by a wait queue+signals, which would even allow for prioritizing which test to run next. Obviously, live feedback would profit from starting the tests in their global order.

I believe this is tabled for now?

the current solution relies on flock which was not available on my mac system. For some reason it works on the Travis Mac? Should we rely on this or add an alternative shlock implementation for Mac?

I don't have a Mac to test, a search of https://stackoverflow.com/questions/10526651/mac-os-x-equivalent-of-linux-flock1-command suggests we do need a Mac implementation of this :/

it occured several times that the parallel path was broken, while sequential running worked. We should be doing all tests in parallel mode too! However, this requires making the test suite ready for parallelization or turning it off where this is not possible.

I would like to see the bats internal test suite passing in parallel too : ] I have wondered if metadata/ENVs in the test file itself could be used to prevent parallel execution. Again we can table for the PR IMHO.

So, pending a discussion/implementation of Mac flock questions, this is ready to merge :pray:

martin-schulze-vireso

comment created time in 9 days

push eventbats-core/bats-core

Ritesh Yadav

commit sha 05a1e7fade9c4faa39ccb6945b089540d7b20c61

fix: includes lib in the npm package installation

view details

Andrew Martin

commit sha 14d195cf0438b54e866e3f2fd11e3b38985bd350

Merge pull request #352 from Ritesh-Yadav/fix-package-json fix: includes lib in the npm package installation

view details

push time in 11 days

PR merged bats-core/bats-core

fix: includes lib in the npm package installation
+1 -0

3 comments

1 changed file

Ritesh-Yadav

pr closed time in 11 days

PullRequestReviewEvent

pull request commentbats-core/bats-core

fix: includes lib in the npm package installation

Thanks for the command @Ritesh-Yadav — @jasonkarns has the NPM account that this is published under, but he doesn't have the bandwidth to publish releases these days.

@jasonkarns would you consider donating the NPM account to the bats-core organisation so we can automate the publishing of new releases to NPM?

Ritesh-Yadav

comment created time in 11 days

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

Love the new functionality in https://github.com/bats-core/bats-core/pull/339/files/626a0db67e0a65ec2accaea59726141d7ad661a4..68fd919cdd3d97e084d61c279faad3e4b2fe9c4f

I appreciate your ongoing work on this @martin-schulze-vireso, I will get it merged in the next two days.

martin-schulze-vireso

comment created time in 11 days

issue commentjenkinsci/in-toto-plugin

org.bouncycastle.crypto.CipherParameters not found building plugin with latest in-toto

Hi @adityasaky, thanks for investigating! I'm currently AFK and won't be back on this for another couple of weeks.

It may have been a local dep issue when building this end. Is it possible to build a release candidate for this plugin and I'll ask one of my team to test it in the meantime?

sublimino

comment created time in 11 days

pull request commentbats-core/bats-core

fix: includes lib in the npm package installation

Thanks @Ritesh-Yadav, are you npm installing direct from this git repo? If so can you share a command we can add to CI please?

Ritesh-Yadav

comment created time in 11 days

push eventcontrolplaneio/docker-base-images

pi-unnerup

commit sha 4149f5ff25e79c5f0e64dee3f8b4479a2420c72b

fix: image builds

view details

Andrew Martin

commit sha fe7615d42640a479506fb6f248c48542abec8fb7

feat: add push jobs

view details

Andrew Martin

commit sha fd92cba90e0c10e7d1f4992caff24225bb314c13

Merge pull request #2 from controlplaneio/image-builds fix: image builds

view details

push time in 13 days

PR merged controlplaneio/docker-base-images

fix: image builds
  • add context to build command
  • add build step images
  • conform image names to registry
+75 -10

1 comment

4 changed files

pi-unnerup

pr closed time in 13 days

pull request commentcontrolplaneio/docker-base-images

fix: image builds

Added push jobs for new build images, rest LGTM

pi-unnerup

comment created time in 13 days

push eventcontrolplaneio/docker-base-images

Andrew Martin

commit sha fe7615d42640a479506fb6f248c48542abec8fb7

feat: add push jobs

view details

push time in 13 days

issue commentbats-core/bats-core

pretty output with junit formatter

I think it would even be useful to output other formats directly to stdout for tests but I would not advertise this as a feature to users.

The thought had crossed my mind too — that would be useful.

The only thing I am not sure about is the default case which currently switches between tap and pretty when an interactiev terminal is detected.

This was the behaviour I suggest we keep, do we have a reason to change it? I know it's slightly slower than TAP, but am not concerned by that as users have control over those flags.

jeff-cook

comment created time in 16 days

issue commentjenkinsci/in-toto-plugin

org.bouncycastle.crypto.CipherParameters not found building plugin with latest in-toto

Thanks for your reply!

The maven build works for me too. The above errors are shown in the Jenkins build log for a pipeline that consumes this built plugin artefact, when the plugin is loaded as a Jenkins plugin and run in that context.

sublimino

comment created time in 16 days

startedaws/amazon-eks-pod-identity-webhook

started time in 16 days

issue commentbats-core/bats-core

pretty output with junit formatter

What do you think about all this @sublimino ? Should we just default to pretty output (maybe with a non-interactive version for CI logs) and make --formatter only about the report format?

This seems reasonable to me.

I'm always nervous about behaviour changes, so would prefer to keep the TAP/pretty defaults as they are (I also prefer TAP on my CLI workflow as it's a little faster).

So IIUC:

  1. --report is the file output type (if any) and defaults to none (no output to disk)
  2. --pretty remains as the "special" formatter, and also implies --report none (if that's even an possible argument, in this case I only mean "default behaviour")
  3. --formatter can be dropped (or aliases to --report)
jeff-cook

comment created time in 17 days

pull request commentbats-core/bats-core

WIP: Move documentation to sphinx

My only preference is simplicity, is GitHub pages easier perhaps?

martin-schulze-vireso

comment created time in 17 days

PullRequestReviewEvent

push eventmartin-schulze-vireso/bats-core

Martin Schulze

commit sha 5d47118033ca7986f4119643beb3cc086e6190a0

docs: move documentation to sphinx

view details

push time in 18 days

PullRequestReviewEvent

issue commentcncf/sig-security

[Project] 2020 NA Cloud Native Security Day VIRTUAL (aka SIG-Security day) at Kubecon

+1 confirmed with thanks : ]

On Sat, 5 Sep 2020 at 08:12, Michael Hausenblas notifications@github.com wrote:

Confirmed and thanks for driving this!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cncf/sig-security/issues/416#issuecomment-687564328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABAXZNOXLFDZT677JCYHMLSEHQENANCNFSM4QY3WPMA .

TheFoxAtWork

comment created time in 20 days

startedabhivaikar/howtheytest

started time in 22 days

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

I retriggered the build in appveyor but it didn't update here, please do rebase @martin-schulze-vireso :thinking:

martin-schulze-vireso

comment created time in 23 days

startedosohq/oso

started time in 23 days

startedtektoncd/chains

started time in 23 days

pull request commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

@martin-schulze-vireso I've fixed some (simple) merge conflicts and re-run tests

martin-schulze-vireso

comment created time in 23 days

push eventmartin-schulze-vireso/bats-core

Kir Kolyshkin

commit sha 71086e6903f67e1c77887f85fcaefb237165a43a

README: add examples of overusing `run` In some cases `run` is used excessively, resulting in a longer and less readable code. Add a few such examples together with recommendations.

view details

Andrew Martin

commit sha cd1a896acfc61d8acb1543882d858758c81cf1ed

Merge pull request #343 from kolyshkin/patch-1 README: add examples of overusing `run`

view details

Martin Schulze

commit sha 9b2b659e5ba769752c0d00dadb3ad9b58f59cbaa

fix: don't use unbound variables in setup methods - fixes #340

view details

Andrew Martin

commit sha 96e56fe54871a336acc083b9129b6a2351e7f04b

Merge pull request #344 from martin-schulze-vireso/bugfix/issue-340 Fix unbound variable in skip

view details

Martin Schulze

commit sha 829e628639b0480d4d2a2ebf1ac6f820cf4c0f3b

fix: make BATS_TEST_NUMBER count per file again - fixes #322 - add and document BATS_GLOBAL_TEST_NUMBER

view details

Martin Schulze

commit sha 392216fca5eb312ba412bd2ff77ab6a71086c3d9

Improve variable names according to review

view details

Martin Schulze

commit sha 54a6b05d2a47bed66f14b57b072fa5f657a8abdd

Fix wrong test number on teardown_file the visibility of test_number_in_suite to traps was wrong

view details

Martin Schulze

commit sha 255d49dd9e1e9083fe836e750ed668276beca20b

Simplify usage of test_number_in_file

view details

Martin Schulze

commit sha 01effdab091fe9bee89f8e3afa9e2e44a597da69

Add comment about idiosyncratic code

view details

Martin Schulze

commit sha aeabe350c5b4bfbc0c8fc1bedc4c03ad13daffc9

Configure bashver for devcontainer

view details

Martin Schulze

commit sha 95364cff4c9a304957be37e7047462aa46fcb9e4

Fix shellcheck errors, let shellcheck fail travis

view details

Martin Schulze

commit sha c66ab4557629f7baad32cee4e198536c0a95cab8

Fix wording to be in sync with manpage

view details

Martin Schulze

commit sha 6b95a7c93fa535a59011bb132b70d0de28298993

Fix shellcheck

view details

Martin Schulze

commit sha 833d26a2b08f313d672f00548590d068b377c6cf

Use exactly one explicit runner for shellcheck

view details

Martin Schulze

commit sha a3d8b3d4590f635aebdfc5803081813eae3d2639

Travis: Avoid confusion with env on MacOS

view details

Martin Schulze

commit sha 205795f9627c7661c3e54df5aa5a2c6a057c2934

Let number of tests differ from file1.bats

view details

Andrew Martin

commit sha 5f171044ac91ddb54bd1c6c3e7b0e6f541ef80b8

Merge pull request #326 from martin-schulze-vireso/bugfix/issue-322 Make BATS_TEST_NUMBER count per file again

view details

Andrew Martin

commit sha 81619e935afc346e864e574051f49b7fb3f726e2

Merge branch 'master' into bugfix/dont_fork_bomb_in_parallel_mode

view details

push time in 23 days

pull request commentbats-core/bats-core

Make BATS_TEST_NUMBER count per file again

Awesome, let's start merging these PRs! :100: Thanks @martin-schulze-vireso :+1:

martin-schulze-vireso

comment created time in 23 days

push eventbats-core/bats-core

Martin Schulze

commit sha 829e628639b0480d4d2a2ebf1ac6f820cf4c0f3b

fix: make BATS_TEST_NUMBER count per file again - fixes #322 - add and document BATS_GLOBAL_TEST_NUMBER

view details

Martin Schulze

commit sha 392216fca5eb312ba412bd2ff77ab6a71086c3d9

Improve variable names according to review

view details

Martin Schulze

commit sha 54a6b05d2a47bed66f14b57b072fa5f657a8abdd

Fix wrong test number on teardown_file the visibility of test_number_in_suite to traps was wrong

view details

Martin Schulze

commit sha 255d49dd9e1e9083fe836e750ed668276beca20b

Simplify usage of test_number_in_file

view details

Martin Schulze

commit sha 01effdab091fe9bee89f8e3afa9e2e44a597da69

Add comment about idiosyncratic code

view details

Martin Schulze

commit sha aeabe350c5b4bfbc0c8fc1bedc4c03ad13daffc9

Configure bashver for devcontainer

view details

Martin Schulze

commit sha 95364cff4c9a304957be37e7047462aa46fcb9e4

Fix shellcheck errors, let shellcheck fail travis

view details

Martin Schulze

commit sha c66ab4557629f7baad32cee4e198536c0a95cab8

Fix wording to be in sync with manpage

view details

Martin Schulze

commit sha 6b95a7c93fa535a59011bb132b70d0de28298993

Fix shellcheck

view details

Martin Schulze

commit sha 833d26a2b08f313d672f00548590d068b377c6cf

Use exactly one explicit runner for shellcheck

view details

Martin Schulze

commit sha a3d8b3d4590f635aebdfc5803081813eae3d2639

Travis: Avoid confusion with env on MacOS

view details

Martin Schulze

commit sha 205795f9627c7661c3e54df5aa5a2c6a057c2934

Let number of tests differ from file1.bats

view details

Andrew Martin

commit sha 5f171044ac91ddb54bd1c6c3e7b0e6f541ef80b8

Merge pull request #326 from martin-schulze-vireso/bugfix/issue-322 Make BATS_TEST_NUMBER count per file again

view details

push time in 23 days

PR merged bats-core/bats-core

Make BATS_TEST_NUMBER count per file again

(fixes #322)

I also added BATS_SUITE_TEST_NUMBER that preserves the previous behavior.

+90 -29

2 comments

13 changed files

martin-schulze-vireso

pr closed time in 23 days

issue closedbats-core/bats-core

Special variable BATS_TEST_NUMBER is not behaving as documented

The readme states

$BATS_TEST_NUMBER is the (1-based) index of the current test case in the test file.

I was using this in a global setup function to print out the name of the file for each test file, once per call to the test file.

((BATS_TEST_NUMBER == 1)) && printf '# --- %s\n' "$(basename "$BATS_TEST_FILENAME")" >&3

I've just upgraded to 1.2.0 and now this is broken. Only the first file is printed and if I add a line that prints the number, it just counts up to the total number of tests.

printf '# -- %d\n' "$BATS_TEST_NUMBER " >&3

Either this is a bug and needs to be fixed, or the readme updated.

closed time in 23 days

harleypig

startedintel-isl/OpenBot

started time in 25 days

startedinguardians/peirates

started time in 25 days

pull request commentbats-core/bats-core

TAP13 compliant timing

Sure thing, restarted the build in Travis.

martin-schulze-vireso

comment created time in 25 days

pull request commentbats-core/bats-core

Make BATS_TEST_NUMBER count per file again

I've had a final check and test, signed these commits, and I think we're good to merge, and then address #339 — I intend to both this weekend if you're happy @martin-schulze-vireso :pray:

martin-schulze-vireso

comment created time in a month

push eventmartin-schulze-vireso/bats-core

Martin Schulze

commit sha 829e628639b0480d4d2a2ebf1ac6f820cf4c0f3b

fix: make BATS_TEST_NUMBER count per file again - fixes #322 - add and document BATS_GLOBAL_TEST_NUMBER

view details

Martin Schulze

commit sha 392216fca5eb312ba412bd2ff77ab6a71086c3d9

Improve variable names according to review

view details

Martin Schulze

commit sha 54a6b05d2a47bed66f14b57b072fa5f657a8abdd

Fix wrong test number on teardown_file the visibility of test_number_in_suite to traps was wrong

view details

Martin Schulze

commit sha 255d49dd9e1e9083fe836e750ed668276beca20b

Simplify usage of test_number_in_file

view details

Martin Schulze

commit sha 01effdab091fe9bee89f8e3afa9e2e44a597da69

Add comment about idiosyncratic code

view details

Martin Schulze

commit sha aeabe350c5b4bfbc0c8fc1bedc4c03ad13daffc9

Configure bashver for devcontainer

view details

Martin Schulze

commit sha 95364cff4c9a304957be37e7047462aa46fcb9e4

Fix shellcheck errors, let shellcheck fail travis

view details

Martin Schulze

commit sha c66ab4557629f7baad32cee4e198536c0a95cab8

Fix wording to be in sync with manpage

view details

Martin Schulze

commit sha 6b95a7c93fa535a59011bb132b70d0de28298993

Fix shellcheck

view details

Martin Schulze

commit sha 833d26a2b08f313d672f00548590d068b377c6cf

Use exactly one explicit runner for shellcheck

view details

Martin Schulze

commit sha a3d8b3d4590f635aebdfc5803081813eae3d2639

Travis: Avoid confusion with env on MacOS

view details

Martin Schulze

commit sha 205795f9627c7661c3e54df5aa5a2c6a057c2934

Let number of tests differ from file1.bats

view details

push time in a month

issue commentgo-jira/jira

Cannot create/edit due date

The create template must contain the field (you may have to generate these first if you're currently using the defaults):

$ cat ~/.jira.d/templates/create
{{/* create template */ -}}
fields:
  project:
    key: {{ or .overrides.project "" }}
  duedate: {{ or .overrides.duedate "" }}    # <-- I added this line
# ...

Then jira create works as expected:

jira create --noedit --project=my-proj --issuetype=Story --override=duedate=2020-09-02 # ...

For other commands, update their templates to add duedate too.

nnadeau

comment created time in a month

MemberEvent

push eventraoulmillais/netassert

Andrew Martin

commit sha 178a1acf0dbd803f684c3fa44732f02f902fb0a1

fix: error handling for gke cluster not found

view details

push time in a month

startedrancher/kine

started time in a month

startedslingamn/vault-exfiltrate

started time in a month

Pull request review commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

 setup() {   cd - >/dev/null } +teardown() {+  # don't cleanup_tmpdir on each test, this interferes with parallel tests+  # do the cleanup once for this file+  test_helper::cleanup_tmpdir "$BATS_TEST_NAME"

Slightly non-standard syntax, do we want to start a style-guide sort of thing for this?

martin-schulze-vireso

comment created time in a month

Pull request review commentbats-core/bats-core

Bugfix: Don't fork bomb in parallel mode

 function teardown_file() {   return 0 } +bats_forward_output_of_parallel_test() {+  local test_number_in_suite=$1+  local status=0+  wait "$(cat "$output_folder/$test_number_in_suite/pid")" || status=1+  cat "$output_folder/$test_number_in_suite/stdout"+  cat "$output_folder/$test_number_in_suite/stderr" >&2+  return $status+}++# prints output from all tests in the order they were started+# $1 == "blocking": wait for a test to finish before printing+#    != "blocking": abort printing, when a test has not finished+bats_forward_output_for_parallel_tests() {+  local status=0+  # was the next test already started?+  while [[ $(( test_number_in_suite_of_last_finished_test + 1 )) -le $test_number_in_suite ]]; do+    # if we are okay with waiting or if the test has already been finished+    if [[ "$1" == "blocking" ]] || (! kill -0 "$(cat "$output_folder/$(( test_number_in_suite_of_last_finished_test + 1 ))/pid")" 2>/dev/null); then

This reads a little poorly, could it be split to a function, or is it on the hotpath and worthy of inline-ing? Also wondering if we need the kill subshell

martin-schulze-vireso

comment created time in a month

more