Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate launch.json #665

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

mjp41
Copy link
Member

@mjp41 mjp41 commented Apr 11, 2024

This adds a CMake option to automatically generate the launch.json file for vscode that runs everything in the testsuite.

This generates a launch.json like:

{
  "version": "0.2.0",
  "configurations": [
        {
      "name": "verona/basic/ex1",
      "type": "cppdbg",
      "request": "launch",
      "program": "/home/mjp41/verona/build/dist/verona/verona",
      "args": ["build", "ex1.verona", "-w", "-o", "/home/mjp41/verona/build/testsuite/verona/basic/ex1_out/ast"],
      "stopAtEntry": false,
      "cwd": "/home/mjp41/verona/testsuite/verona/basic",
    },
    {
      "name": "verona_nostdlib/basic/ex1",
      "type": "cppdbg",
      "request": "launch",
      "program": "/home/mjp41/verona/build/dist/verona/verona",
      "args": ["build", "ex1.verona", "-w", "-o", "/home/mjp41/verona/build/testsuite/verona_nostdlib/basic/ex1_out/ast", "--dump_passes", "/home/mjp41/verona/build/testsuite/verona_nostdlib/basic/ex1_out", "--no-std", "-p", "defaultargs"],
      "stopAtEntry": false,
      "cwd": "/home/mjp41/verona/testsuite/verona_nostdlib/basic",
    },
    {
      "name": "verona_nostdlib/spec/comments",
      "type": "cppdbg",
      "request": "launch",
      "program": "/home/mjp41/verona/build/dist/verona/verona",
      "args": ["build", "comments.verona", "-w", "-o", "/home/mjp41/verona/build/testsuite/verona_nostdlib/spec/comments_out/ast", "--dump_passes", "/home/mjp41/verona/build/testsuite/verona_nostdlib/spec/comments_out", "--no-std", "-p", "defaultargs"],
      "stopAtEntry": false,
      "cwd": "/home/mjp41/verona/testsuite/verona_nostdlib/spec",
    },
    {
      "name": "verona_nostdlib/spec/comments_broken_nest",
      "type": "cppdbg",
      "request": "launch",
      "program": "/home/mjp41/verona/build/dist/verona/verona",
      "args": ["build", "comments_broken_nest.verona", "-w", "-o", "/home/mjp41/verona/build/testsuite/verona_nostdlib/spec/comments_broken_nest_out/ast", "--dump_passes", "/home/mjp41/verona/build/testsuite/verona_nostdlib/spec/comments_broken_nest_out", "--no-std", "-p", "defaultargs"],
      "stopAtEntry": false,
      "cwd": "/home/mjp41/verona/testsuite/verona_nostdlib/spec",
    },
  ]
}

You need to run

cmake -DVERONA_GENERATE_LAUNCH_JSON=On ..

and it will write to that location with a launch.json that contains all the tests from the testsuite.

This adds a CMake option to automatically generate the launch.json file for vscode that runs everything in the testsuite.
@mjp41 mjp41 merged commit fc3c6df into microsoft:master Apr 11, 2024
10 checks passed
@mjp41 mjp41 deleted the launch_json branch April 11, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants