qooxdoo / qxl.testtapper

A headless testrunner for qooxdoo unit tests using the TAP protocol
http://www.qooxdoo.org/qxl.testtapper
MIT License
0 stars 1 forks source link

Return code 0 when 256 tests fail #36

Open milandamen opened 2 years ago

milandamen commented 2 years ago

Describe the bug When running tests with qx test and the amount of failing tests is 256, the resulting code will be 0.

To Reproduce Steps to reproduce the behavior:

  1. Have a collection of tests where exactly 256 tests fail.
  2. Run the tests using qx test
  3. Get the result code using echo $?

Expected behavior Expect a non-zero result code, because not all tests passed.

Log

$ qx test
...
DONE testing 405 ok, 256 not ok, 0 skipped - [21942 ms]
$ echo $?
0

Desktop:

qx-lock.json

{
  "libraries": [
    {
      "library_name": "Commandline Testrunner for Qooxdoo Apps",
      "library_version": "1.0.12",
      "path": "qx_packages/qooxdoo_qxl_testtapper_v1_0_12",
      "uri": "qooxdoo/qxl.testtapper",
      "repo_name": "qooxdoo/qxl.testtapper",
      "repo_tag": "v1.0.12"
    },
    {
      "library_name": "logpane",
      "library_version": "1.0.3",
      "path": "qx_packages/qooxdoo_qxl_logpane_v1_0_3",
      "uri": "qooxdoo/qxl.logpane",
      "repo_name": "qooxdoo/qxl.logpane",
      "repo_tag": "v1.0.3"
    }
  ],
  "version": "2.1.0"
}

Qooxdoo framework version: 7.0.0-beta.6

hkollmann commented 2 years ago

This is a problem of bash - error code is only a byte. Any suggestions? Stop counting by 255?

milandamen commented 2 years ago

I think the exit code should not reflect how many tests failed, but what kind of "error" occurred.

I kind of like how Go's Ginkgo package does exit codes: