[SERVER-34177] "scons compile" test needs quotes in evergreen.yml Created: 28/Mar/18  Updated: 29/Oct/23  Resolved: 02/Apr/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Bug Priority: Minor - P4
Reporter: Jonathan Abrahams Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-33204 Modify Evergreen.yml to support Bench... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 2018-04-09
Participants:

 Description   

The following code in "scons compile" requires a quote for the macro ${targets}:

        if [ ${targets} = "all" ] && [ -n "${num_scons_compile_all_jobs_available|}" ]; then
          echo "Changing SCons to run with --jobs=${num_scons_compile_all_jobs_available|}"
          extra_args="$extra_args --jobs=${num_scons_compile_all_jobs_available|}"
        fi

It produces this error

sh: line 10: [: too many arguments



 Comments   
Comment by Githook User [ 02/Apr/18 ]

Author:

{'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}

Message: SERVER-34177 Add quotes around ${targets} expansion in "scons compile".
Branch: master
https://github.com/mongodb/mongo/commit/d4629daf3c3a024415ca2ddff9234b8455d5b19b

Comment by Jonathan Abrahams [ 28/Mar/18 ]

max.hirschhorn True it is not failing, just generating noise, the summary has been changed:

[2018/03/28 15:45:02.401] Running command 'shell.exec' in "scons compile" (step 13 of 25)
[2018/03/28 15:45:02.402] if [ "" = "true" ] && [ "false" = "true" ]; then
[2018/03/28 15:45:02.402]   exit 0
[2018/03/28 15:45:02.402] fi
[2018/03/28 15:45:02.402] rm -rf /data/mongo-install-directory
[2018/03/28 15:45:02.403] extra_args=""
[2018/03/28 15:45:02.403] if [ core tools dbtest integration_tests dist dist-debugsymbols distsrc-tgz  = "all" ] && [ -n "" ]; then
[2018/03/28 15:45:02.403]   echo "Changing SCons to run with --jobs="
[2018/03/28 15:45:02.403]   extra_args="$extra_args --jobs="
[2018/03/28 15:45:02.403] fi
[2018/03/28 15:45:02.403] sh: line 10: [: too many arguments

Comment by Max Hirschhorn [ 28/Mar/18 ]

jonathan.abrahams, why isn't this failing in the Evergreen mainline right now then?

- func: "scons compile"
  vars:
    targets: core tools dbtest integration_tests dist dist-debugsymbols distsrc-${ext|tgz} ${msi_target|}
    task_compile_flags: >-
      --use-new-tools
      --build-mongoreplay="${build_mongoreplay}"
      --detect-odr-violations

Generated at Thu Feb 08 04:35:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.