Repository navigation
Closed
Labels
A:ciRelated to one or more of the CI jobscategory:bugSomething isn't workinggood first issueGood for newcomers
Description
Describe the bug
Running toolkit check pr from the base of the repository does toolkit test --features []. Because the root manifest is not a virtual manifest, this results in only testing the root package for the Nu CLI, running ~1002 tests out of the ~3069 there are in the workspace.
How to reproduce
-
nushell> toolkit test --features [] | lines | parse "test result: {result}. {passed} passed; {failed} failed; {ignored} ignored; {measured} measured; {filtered_out} filtered out; finished in {duration}" Finished test [unoptimized + debuginfo] target(s) in 0.62s Running unittests src/main.rs (D:\.rust\target\debug\deps\nu-8042b58b4167bbc9.exe) ╭───┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├───┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 0 │ ok │ 528 │ 0 │ 4 │ 0 │ 0 │ 2.63s │ ╰───┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Running tests\main.rs (D:\.rust\target\debug\deps\main-17d64ff9d3d2692a.exe) ╭───┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├───┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 1 │ ok │ 474 │ 0 │ 20 │ 0 │ 0 │ 8.22s │ ╰───┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯
-
nushell> cargo test --workspace --no-fail-fast | lines | parse "test result: {result}. {passed} passed; {failed} failed; {ignored} ignored; {measured} measured; {filtered_out} filtered out; finished in {duration}" Finished test [unoptimized + debuginfo] target(s) in 0.82s Running unittests src/main.rs (D:\.rust\target\debug\deps\nu-d7e8244dc511622c.exe) ╭───┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├───┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 0 │ ok │ 528 │ 0 │ 4 │ 0 │ 0 │ 2.65s │ ╰───┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Running tests\main.rs (D:\.rust\target\debug\deps\main-7d97b112899aace0.exe) ╭───┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├───┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 1 │ ok │ 474 │ 0 │ 20 │ 0 │ 0 │ 8.47s │ ╰───┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_cli-14a95418f26edf81.exe) Running tests\completions.rs (D:\.rust\target\debug\deps\completions-7f2e2709765b85a1.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_cmd_base-b5a2e8a267b499ed.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_cmd_dataframe-cac70964b0c56b52.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_cmd_extra-ec696752f7cdcc33.exe) Running tests\main.rs (D:\.rust\target\debug\deps\main-34c890fcebffbdea.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_cmd_lang-7d53340ee1192e59.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_color_config-e32d8c6c3684c5d7.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_command-77ae22a89c1f269b.exe) ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 2 │ ok │ 15 │ 0 │ 0 │ 0 │ 0 │ 0.01s │ │ 3 │ ok │ 38 │ 0 │ 3 │ 0 │ 0 │ 0.02s │ │ 4 │ ok │ 8 │ 0 │ 0 │ 0 │ 0 │ 0.01s │ │ 5 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 6 │ ok │ 46 │ 0 │ 0 │ 0 │ 0 │ 0.06s │ │ 7 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 8 │ ok │ 29 │ 0 │ 0 │ 0 │ 0 │ 0.01s │ │ 9 │ ok │ 23 │ 0 │ 0 │ 0 │ 0 │ 0.37s │ │ 10 │ ok │ 365 │ 0 │ 0 │ 0 │ 0 │ 1.15s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Running tests\main.rs (D:\.rust\target\debug\deps\main-f27407fd0a666841.exe) ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 11 │ FAILED │ 1235 │ 1 │ 26 │ 0 │ 0 │ 12.66s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ error: test failed, to rerun pass `-p nu-command --test main` Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_engine-ca8ec6775b02da9c.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_explore-f3fbe8e0af0791d9.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_glob-78c430cbb88a1699.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_json-53d93806800af42d.exe) Running tests\main.rs (D:\.rust\target\debug\deps\main-d1e6e36f0c67ef3b.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_parser-8c9de42a70e16690.exe) Running tests\test_lex.rs (D:\.rust\target\debug\deps\test_lex-4fb168106100dd99.exe) Running tests\test_parser.rs (D:\.rust\target\debug\deps\test_parser-9dfa67e7b394e900.exe) Running tests\test_parser_unicode_escapes.rs (D:\.rust\target\debug\deps\test_parser_unicode_escapes-c8199d98ecc7c663.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_path-b21459b3d7edfd5f.exe) Running tests\mod.rs (D:\.rust\target\debug\deps\mod-4f6ff9f5acdfb8fb.exe) Running tests\util.rs (D:\.rust\target\debug\deps\util-98d539ae590fb813.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_plugin-7d783ae909df5250.exe) Running unittests src/lib.rs (D:\.rust\target\debug\deps\nu_pretty_hex-4579704973533805.exe) Running tests\tests.rs (D:\.rust\target\debug\deps\tests-7b660e336c0cd28e.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_protocol-36be54349e9c3825.exe) Running tests\into_config.rs (D:\.rust\target\debug\deps\into_config-2e3ded5385847b12.exe) ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 12 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 13 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 14 │ ok │ 17 │ 0 │ 0 │ 0 │ 0 │ 0.39s │ │ 15 │ ok │ 1 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 16 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 17 │ ok │ 4 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 18 │ ok │ 18 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 19 │ ok │ 92 │ 0 │ 2 │ 0 │ 0 │ 0.01s │ │ 20 │ ok │ 2 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 21 │ ok │ 31 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 22 │ ok │ 4 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 23 │ ok │ 4 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 24 │ ok │ 17 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 25 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 26 │ ok │ 1 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 27 │ ok │ 15 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 28 │ ok │ 7 │ 0 │ 3 │ 0 │ 0 │ 0.43s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Running tests\test_config.rs (D:\.rust\target\debug\deps\test_config-7d582c0eff414c1d.exe) Running tests\test_pipeline_data.rs (D:\.rust\target\debug\deps\test_pipeline_data-c48cec3b0f4199af.exe) Running tests\test_signature.rs (D:\.rust\target\debug\deps\test_signature-4262f0e9a5796b0e.exe) Running tests\test_value.rs (D:\.rust\target\debug\deps\test_value-7b298745e863be26.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_std-d8d414ebad76d7a7.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_system-910d2f64e7e51b69.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_table-95fb0c9749ff3450.exe) Running tests\common.rs (D:\.rust\target\debug\deps\common-4ea7ddab5d784426.exe) Running tests\constrains.rs (D:\.rust\target\debug\deps\constrains-1604cdc0e4ef2ed4.exe) Running tests\expand.rs (D:\.rust\target\debug\deps\expand-8e37862e1b7ac557.exe) Running tests\style.rs (D:\.rust\target\debug\deps\style-a02b25431a336cbb.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_term_grid-935f709978c21eb9.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_test_support-0dfe3c31d28588e5.exe) Running tests\get_system_locale.rs (D:\.rust\target\debug\deps\get_system_locale-667ee17097a2a200.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_utils-12e2b309fb1619cc.exe) Running unittests src/main.rs (D:\.rust\target\debug\deps\utils-9d194edc7ca8f908.exe) Running unittests src\main.rs (D:\.rust\target\debug\deps\nu_plugin_custom_values-50a5da8e63c48ad7.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_plugin_example-f05cbd8139b647d0.exe) Running unittests src\main.rs (D:\.rust\target\debug\deps\nu_plugin_example-0b4ae1fdc7ea20f3.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_plugin_formats-a259edef8d0eb3be.exe) Running unittests src\main.rs (D:\.rust\target\debug\deps\nu_plugin_formats-b08b64f848c2a0e6.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_plugin_gstat-b04ddb5849f66aff.exe) Running unittests src\main.rs (D:\.rust\target\debug\deps\nu_plugin_gstat-4dd50d6f5bd94bc6.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_plugin_inc-cc9e7989cc94e392.exe) Running unittests src\main.rs (D:\.rust\target\debug\deps\nu_plugin_inc-4b1e08cd02a4e263.exe) Running unittests src\lib.rs (D:\.rust\target\debug\deps\nu_plugin_query-d131eb1b1468bbd5.exe) Running unittests src\main.rs (D:\.rust\target\debug\deps\nu_plugin_query-d34dddb96a70f113.exe) Doc-tests nu-cli ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 29 │ ok │ 7 │ 0 │ 0 │ 0 │ 0 │ 0.46s │ │ 30 │ ok │ 1 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 31 │ ok │ 5 │ 0 │ 0 │ 0 │ 0 │ 0.06s │ │ 32 │ ok │ 3 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 33 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 34 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 35 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 36 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 37 │ ok │ 7 │ 0 │ 0 │ 0 │ 0 │ 0.01s │ │ 38 │ ok │ 1 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 39 │ ok │ 10 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 40 │ ok │ 13 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 41 │ ok │ 3 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 42 │ ok │ 2 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 43 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 44 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 45 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 46 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 47 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 48 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 49 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 50 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 51 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 52 │ ok │ 3 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 53 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 54 │ ok │ 39 │ 0 │ 0 │ 0 │ 0 │ 0.01s │ │ 55 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 56 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Doc-tests nu-cmd-base Doc-tests nu-cmd-dataframe Doc-tests nu-cmd-extra Doc-tests nu-cmd-lang Doc-tests nu-color-config Doc-tests nu-command ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 57 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 58 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 59 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 60 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 61 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 62 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Doc-tests nu-engine Doc-tests nu-explore Doc-tests nu-glob Doc-tests nu-json Doc-tests nu-parser ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 63 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 64 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 65 │ ok │ 5 │ 0 │ 1 │ 0 │ 0 │ 0.47s │ │ 66 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 67 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Doc-tests nu-path Doc-tests nu-plugin ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 68 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 69 │ ok │ 12 │ 0 │ 0 │ 0 │ 0 │ 9.58s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Doc-tests nu-protocol ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 70 │ ok │ 1 │ 0 │ 0 │ 0 │ 0 │ 0.57s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯ Doc-tests nu-std Doc-tests nu-system Doc-tests nu-table Doc-tests nu-term-grid Doc-tests nu-utils Doc-tests nu_plugin_example Doc-tests nu_plugin_formats error: 1 target failed: `-p nu-command --test main` ╭────┬────────┬────────┬────────┬─────────┬──────────┬──────────────┬──────────╮ │ # │ result │ passed │ failed │ ignored │ measured │ filtered_out │ duration │ ├────┼────────┼────────┼────────┼─────────┼──────────┼──────────────┼──────────┤ │ 71 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 72 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 73 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 74 │ ok │ 1 │ 0 │ 0 │ 0 │ 0 │ 0.23s │ │ 75 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 76 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ │ 77 │ ok │ 0 │ 0 │ 0 │ 0 │ 0 │ 0.00s │ ╰────┴────────┴────────┴────────┴─────────┴──────────┴──────────────┴──────────╯
Expected behavior
I expected toolkit check pr to run all of the tests that get run by CI. So I think check pr should probably lose the --features flag and always do test --workspace instead.
Screenshots
No response
Configuration
Using toolkit.nu from commit 2e68e6d
Additional context
This is why I was 🟢 on toolkit test for my last couple PRs but still ❌ on CI.
There's a test failure in my reproduction due to lack of #10905.
Metadata
Metadata
Assignees
Labels
A:ciRelated to one or more of the CI jobscategory:bugSomething isn't workinggood first issueGood for newcomers
Activity
fdncred commentedon Nov 1, 2023
I think the intent has always been to make the toolkit run the tests that are in the CI. If that's not happening, then it's a bug and should be fixed. Maybe your solution is a better/easier way to do that.
amtoine commentedon Nov 1, 2023
yeah that's definitely a bug, and an annoying one when developing...
amtoine commentedon Nov 1, 2023
the idea was to allow running specific features locally, without the whole workspace.
so maybe we could just change the default behaviour?
amtoine commentedon Nov 1, 2023
so
nushell/toolkit.nu
Line 63 in 15c22db
if not ($features | is-empty)instead ofif $workspace🤔CAD97 commentedon Nov 1, 2023
I'd argue that if someone wants to test specific features, they'd be better off using
toolkit test(or cargo directly) thantoolkit check pr, because they probably don't want/need to do fmt/clippy/nu-std. But the important part imo is changing the default behavior to--workspace.amtoine commentedon Nov 2, 2023
oooh my bad, you talked about changing
toolkit check pronly, i.e. the call totoolkit testin it, nottoolkit testitself!that's a very good point 👌
Fix duplicate implementation and some clippy
Fix toolkit to run workspace on 'check pr' (issue nushell#10906)
Fix toolkit to run workspace on 'check pr' (issue nushell#10906)
Fix toolkit to run workspace on 'check pr' (issue nushell#10906)
Fix toolkit to run workspace on 'check pr' (issue #10906) (#11112)
Fix toolkit to run workspace on 'check pr' (issue nushell#10906) (nus…
Fix toolkit to run workspace on 'check pr' (issue nushell#10906) (nus…