[SERVER-11207] smoke.py expand wildcards on Windows Created: 15/Oct/13  Updated: 06/Dec/22  Resolved: 11/May/20

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

Type: Bug Priority: Major - P3
Reporter: Sridhar Nanjundeswaran Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: 26qa, neweng, tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Enterprise build on Windows Server 2008 R2
Git hash:
mongo - 1ea7e56cb2b8653d4b0453f04728033df34be9e1
enterprise - d919ef07f817832732d2a0a2ec68251bc161193a


Issue Links:
Related
related to SERVER-1424 smoke.py could use some work Closed
Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Steps To Reproduce:
  1. Install MongoDB enterprise edition
  2. git clone mongodb
  3. Install python, pymongo, pywin32
  4. python buildscripts\smoke.py --mongod="c:\Program Files\MongoDB 2.5.2 Enterprise\bin\mongod.exe" --mongo="c:\Program Files\MongoDB 2.5.2 Enterprise\bin\mongo.exe" --smoke-db-prefix=d:\smoke --use-ssl --mode=files jstests\queryTmp
Participants:

 Description   

smoke.py fails with Error 5 Access Denied (this is being run from a Administrator Window)

*******************************************
Test : queryTmp ...
Command : c:\Users\qa377\git\mongo\jstests\queryTmp --port 27999
Date : Tue Oct 15 23:33:16 2013
0 tests succeeded
1 tests didn't get run
Traceback (most recent call last):
File "buildscripts\smoke.py", line 1116, in <module>
main()
File "buildscripts\smoke.py", line 1101, in main
run_tests(tests)
File "buildscripts\smoke.py", line 644, in run_tests
runTest(test, test_result)
File "buildscripts\smoke.py", line 533, in runTest
proc = Popen(buildlogger(argv), cwd=test_path, stdout=PIPE)
File "c:\python27\lib\subprocess.py", line 711, in _init_
errread, errwrite)
File "c:\python27\lib\subprocess.py", line 948, in _execute_child
startupinfo)
WindowsError: [Error 5] Access is denied



 Comments   
Comment by Ryan Timmons [ 11/May/20 ]

Closing as wont-fix to indicate that there is currently no intention of doing this. Please re-open if there is priority for this.

Comment by Eric Milkie [ 30/Oct/13 ]

We just need to run glob manually on Windows to expand wildcards. Something like this at the top of smoke.py:

if '*' in sys.argv[-1]:
sys.argv[-1:] = glob.glob(sys.argv[-1])

Comment by Sridhar Nanjundeswaran [ 17/Oct/13 ]

Same errors with forward slashes also.

Comment by Eric Milkie [ 17/Oct/13 ]

You may have better luck with wildcard expansion (done by windows-python internally) if you use a unix-style path. Give that a try?
The suite name will also work and do what you want for ssl anyway, so if that works, just use it.

Comment by Sridhar Nanjundeswaran [ 17/Oct/13 ]

The same errors are seen without the --use-ssl option

Comment by Sridhar Nanjundeswaran [ 17/Oct/13 ]

Specifying *.js seems to try and load a file of that name. The above command line gives

72T013-10-17T05:24:19.983+0000 file [c:\Users\qa377\git\mongo\jstests\queryTmp\*.js] doesn't exist
0f5ailed to load: c:\Users\qa377\git\mongo\jstests\queryTmp*.js
:2 4 234.0000 ms
:t1est c:\Users\qa377\git\mongo\jstests\queryTmp*.js exited with status -39
0 tests succeeded
The following tests failed (with exit code):
c:\Users\qa377\git\mongo\jstests\queryTmp*.js -3
Traceback (most recent call last):
File "buildscripts\smoke.py", line 1116, in <module>
main()
File "buildscripts\smoke.py", line 1113, in main
report()
File "buildscripts\smoke.py", line 730, in report
raise Exception("Test failures")
Exception: Test failures

Comment by Andy Schwerin [ 16/Oct/13 ]

I don't think that's the right command line for running all the tests in a directory. Try:

python buildscripts\smoke.py --mongod="c:\Program Files\MongoDB 2.5.2 Enterprise\bin\mongod.exe" --mongo="c:\Program Files\MongoDB 2.5.2 Enterprise\bin\mongo.exe" --smoke-db-prefix=d:\smoke --use-ssl --mode=files jstests\queryTmp\*.js

Generated at Thu Feb 08 03:25:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.