Last active
February 11, 2021 23:32
-
-
Save GMNGeoffrey/21ea35f89495921adc877d4980589651 to your computer and use it in GitHub Desktop.
ctest with directory specification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Copyright 2021 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
#!/usr/bin/python3 | |
import argparse | |
import subprocess | |
import sys | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-B", | |
dest="directory", | |
help="Directory from which to invoke ctest") | |
args, unknown = parser.parse_known_args() | |
process = subprocess.run(["ctest"] + unknown, cwd=args.directory) | |
sys.exit(process.returncode) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment