Skip to content

Commit

Permalink
Replace pipes.quote with shlex.quote in lit config (#3547)
Browse files Browse the repository at this point in the history
* Replace pipes.quote with shlex.quote

* Drop TBB run on windows to unblock CI

* Update ci/matrix.yaml

Co-authored-by: Michael Schellenberger Costa <[email protected]>
Co-authored-by: Bernhard Manfred Gruber <[email protected]>
  • Loading branch information
3 people authored Jan 28, 2025
1 parent cdd94ad commit c3948c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 3 additions & 2 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ workflows:
- {jobs: ['build'], std: 'max', cxx: ['msvc2019']}
- {jobs: ['build'], std: 'all', cxx: ['gcc', 'clang', 'msvc']}
# Current CTK testing:
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['gcc']}
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['clang', 'msvc']}
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['gcc', 'clang']}
# Disabled until we figure out the issue with the TBB dll
#- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['msvc']}
# Split up cub tests:
- {jobs: ['test_nolid', 'test_lid0'], project: ['cub'], std: 'max', cxx: ['gcc']}
- {jobs: ['test_lid1', 'test_lid2'], project: ['cub'], std: 'max', cxx: ['gcc']}
Expand Down
11 changes: 5 additions & 6 deletions libcudacxx/test/utils/libcudacxx/test/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import ctypes
import os
import pipes
import platform
import re
import shlex
Expand Down Expand Up @@ -1512,14 +1511,14 @@ def configure_modules(self):

def configure_substitutions(self):
sub = self.config.substitutions
cxx_path = pipes.quote(self.cxx.path)
cxx_path = shlex.quote(self.cxx.path)
# Configure compiler substitutions
sub.append(("%cxx", cxx_path))
sub.append(("%libcxx_src_root", self.libcudacxx_src_root))
# Configure flags substitutions
flags_str = " ".join([pipes.quote(f) for f in self.cxx.flags])
compile_flags_str = " ".join([pipes.quote(f) for f in self.cxx.compile_flags])
link_flags_str = " ".join([pipes.quote(f) for f in self.cxx.link_flags])
flags_str = " ".join([shlex.quote(f) for f in self.cxx.flags])
compile_flags_str = " ".join([shlex.quote(f) for f in self.cxx.compile_flags])
link_flags_str = " ".join([shlex.quote(f) for f in self.cxx.link_flags])
all_flags = "%s %s %s" % (flags_str, compile_flags_str, link_flags_str)
sub.append(("%flags", flags_str))
sub.append(("%compile_flags", compile_flags_str))
Expand Down Expand Up @@ -1548,7 +1547,7 @@ def configure_substitutions(self):
sub.append(("%run", "%t.exe"))
# Configure not program substitutions
not_py = os.path.join(self.libcudacxx_src_root, "test", "utils", "not.py")
not_str = "%s %s " % (pipes.quote(sys.executable), pipes.quote(not_py))
not_str = "%s %s " % (shlex.quote(sys.executable), shlex.quote(not_py))
sub.append(("not ", not_str))
if self.get_lit_conf("libcudacxx_gdb"):
sub.append(("%libcxx_gdb", self.get_lit_conf("libcudacxx_gdb")))
Expand Down

0 comments on commit c3948c4

Please sign in to comment.