-
Notifications
You must be signed in to change notification settings - Fork 31
Description
What I am doing:
I integrated Crystalball project with Knapsack_Pro. Here is how they work: Crystalball output the list of tests that needs to be ran because they are connected to the ruby code that have been changed by developers, so we only run selected portion of rspec tests. Now Knapsack_Pro need to take this list into KNAPSACK_PRO_TEST_FILE_LIST to start running them in parallel.
The code to run it is something like below:
KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true \
KNAPSACK_PRO_PROJECT_DIR=. \
KNAPSACK_PRO_CI_NODE_TOTAL=$CI_NODE_TOTAL \
KNAPSACK_PRO_CI_NODE_INDEX=$(($CI_NODE_INDEX-1)) \
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=<the token> \
KNAPSACK_PRO_TEST_FILE_LIST=$(cat tmp/crystalball_prediction) \
bundle exec rake "knapsack_pro:queue:rspec[--format documentation --format RspecJunitFormatter --out tmp/rspec.xml]"
NOTE: the crystalball_prediction file is the output of Crystalball project.
However I am facing an issue that the number of tests in this file is sometimes too large, so I got argument list too large issue like this: /usr/local/bin/bundle: Argument list too long. I believe the tests being cat out is too large then it is over the ARG_MAX of the nodes. However I didn't get luck to increase the stack to make it work.
Therefor I am wondering if there is a way to ask knapsack_pro read test cases from a file? so I don't have to print it into the parameter. Thanks.