- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4
Add SelectByName parameter #148
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
base: master
Are you sure you want to change the base?
Changes from 26 commits
4bc8e86
              9413f22
              f444f1d
              e4f4ac6
              9425747
              2ed76cc
              116be18
              e16adf7
              9ec180e
              2ae052a
              37a6828
              24c8e78
              f32317e
              4c322bf
              35dae19
              cc27322
              608db0e
              b859f7e
              4a571d7
              ebe8b20
              f43cd5c
              9f54ca6
              bb81c48
              7220fb2
              5706504
              d8491e4
              16fd3e0
              8068542
              bdbfd26
              0928d98
              df19b45
              77d9298
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: 1.13$(Rev:.r) | ||
| name: 1.14$(Rev:.r) | ||
|  | ||
| trigger: | ||
| - master | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -11,12 +11,22 @@ export interface IRunTestsOptions { | |
| CoberturaModelCoverage?: string; | ||
| SelectByTag?: string; | ||
| SelectByFolder?: string; | ||
| SelectByName?: string; | ||
| Strict?: boolean; | ||
| UseParallel?: boolean; | ||
| OutputDetail?: string; | ||
| LoggingLevel?: string; | ||
| } | ||
|  | ||
| // Function to convert space separated names to cell array of character vectors | ||
| export function getSelectByNameAsCellArray(input?: string): string { | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hopefully this is just temporary until scriptgen gets updated to properly accept SelectByName as a space separated string? While unlikely, single-quotes in the strings need to be escaped or it may result in a malformed cell array. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I created an issue in scritgen repo and added a note to update this once that issue is resolved. | ||
| if (!input || !input.trim()) { | ||
| return "{}"; | ||
| } | ||
| const items = input.split(/\s+/).filter(Boolean).map((s) => `'${s}'`); | ||
|         
                  Vahila marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved         
                  davidbuzinski marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| return `{${items.join(", ")}}`; | ||
| } | ||
|  | ||
| export function generateCommand(options: IRunTestsOptions): string { | ||
| return `addpath('${path.join(__dirname, "scriptgen")}');` + | ||
| `testScript = genscript('Test',` + | ||
|  | @@ -28,6 +38,7 @@ export function generateCommand(options: IRunTestsOptions): string { | |
| `'CoberturaModelCoverage','${options.CoberturaModelCoverage || ""}',` + | ||
| `'SelectByTag','${options.SelectByTag || ""}',` + | ||
| `'SelectByFolder','${options.SelectByFolder || ""}',` + | ||
| `'SelectByName',${getSelectByNameAsCellArray(options.SelectByName)},` + | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a plan to go back and fix scriptgen so this can be: 
 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, created an issue under scriptgen repo. | ||
| `'Strict',${options.Strict || false},` + | ||
| `'UseParallel',${options.UseParallel || false},` + | ||
| `'OutputDetail','${options.OutputDetail || ""}',` + | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -57,6 +57,15 @@ | |
| "required": false, | ||
| "helpMarkDown": "Test tag used to select test suite elements. To create a test suite, the task uses only the test elements with the specified tag." | ||
| }, | ||
| { | ||
| "name": "selectByName", | ||
| "type": "string", | ||
| "label": "By name", | ||
| "defaultValue": "", | ||
| "groupName": "filterTests", | ||
| "required": false, | ||
| "helpMarkDown": "Test name used to select test suite elements. To create a test suite, the task uses only the test elements with the specified name." | ||
|          | ||
| }, | ||
| { | ||
| "name": "strict", | ||
| "type": "boolean", | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
! grep -q FirstTest test-results/matlab/selectbytag.xml?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to remove the
!?This is to verify that the 'FirstTest' test is not run so used a
!before thegrepcommand.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget what I meant, but I think I meant to type
selectbyname.xml. Should they all be checking in one .xml for the select by name run?