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

[packchk] no error message if ../etc/PACK.xsd not found #786

Closed
jkrech opened this issue Mar 7, 2023 · 4 comments
Closed

[packchk] no error message if ../etc/PACK.xsd not found #786

jkrech opened this issue Mar 7, 2023 · 4 comments
Assignees
Labels
bug Something isn't working fixed Issue is fixed, please verify.

Comments

@jkrech
Copy link
Member

jkrech commented Mar 7, 2023

Describe the bug
if packchk does not find the pack schema in the default location (../etc/PACK.xsd) to validate against no output is provided.

To Reproduce
Steps to reproduce the behavior:
run packchk without ../etc/PACK.xsd present

Expected behavior
A clear and concise error message should be provided that the PACK.xsd could not be found in <absolute path>.

*** ERROR M218:
  Unable to find schema file '<absolute path>/PACK.xsd' for validation

To be discussed:

  • consider to continue the validation skipping the schema validation ?
  • the tool header output is currently appearing after any schema check and there is not message indicating that in case the schema check was successful
  • in case of schema errors this is the output:
packchk.exe ARM.CMSIS.pdsc --xsd c:\Keil_538a\UV4\PACK.xsd
Error at file C:/CMSIS-PACKS/ARM/CMSIS/5.9.0/ARM.CMSIS.pdsc, line 408, column 54: value 'ARM:81' not in enumeration

CMSIS Pack Checker 0.0.0+g9b4a2e2 (C) 2012-2023 Arm Ltd. and Contributors

Environment (please complete the following information):

  • [packchk]
  • Version [development branch]
  • OS: [any]

Additional context
Add any other context about the problem here.

@jkrech jkrech added the bug Something isn't working label Mar 7, 2023
@jkrech jkrech changed the title [packchk] if the tool does not find ../etc/PACK.xsd no error message is displayed [packchk] no error message if ../etc/PACK.xsd not found Mar 7, 2023
@thorstendb-ARM
Copy link
Collaborator

thorstendb-ARM commented May 17, 2023

  1. Message M218 has been changed to: "Unable to find schema file for validation: '%PATH%'"
    In case of default location of PACK.xsd, %PATH% iss expanded to "./, ../etc/, ../../etc/" (which is where packchk searches).
  2. consider to continue the validation skipping the schema validation ?
    yes
  3. the tool header output is currently appearing after any schema check and there is not message indicating that in case the schema check was successful
    fixed

@thorstendb-ARM thorstendb-ARM added the fixed Issue is fixed, please verify. label May 25, 2023
grasci-arm pushed a commit to ARM-software/devtools that referenced this issue May 30, 2023
…ck#786 (Open-CMSIS-Pack#576)

added:
- Schema Validation Test

changed:
- Xerxes continues checking after first error (do not treat everything as critical)
- added test cases for schema check
edriouk pushed a commit that referenced this issue May 30, 2023
…946)

added:
- Schema Validation Test

changed:
- Xerxes continues checking after first error (do not treat everything
as critical)
- added test cases for schema check

Co-authored-by: Thorsten de Buhr <thorstendb-ARM@users.noreply.github.com>
@thorstendb-ARM
Copy link
Collaborator

@jkrech
Copy link
Member Author

jkrech commented Jun 2, 2023

Validating version 1.4.0:

packchk.exe ARM.CMSIS-NN.pdsc


*** ERROR M218:
  Unable to find schema file for validation: './, ../etc/, ../../etc/'

*** ERROR M105:
  Error while parsing command arguments

@jkrech jkrech closed this as completed Jun 2, 2023
@thorstendb-ARM
Copy link
Collaborator

thorstendb-ARM commented Jun 2, 2023

Reviewed messages:

CMSIS Pack Checker 0.0.0+g9471c31 (C) 2012-2023 Arm Ltd. and Contributors

*** ERROR M218:
  Unable to find PACK.xsd schema file. Searched in './, ../etc/, ../../etc/' relative to 'D:\GIT\devtools-external\build\tools\packchk\windows-amd64\Debug\'.
  Alternatively use --xsd to specify the location of the schema file. 

Log created on Fri Jun  2 10:26:01 2023
CMSIS Pack Checker 0.0.0+g9471c31 (C) 2012-2023 Arm Ltd. and Contributors

*** ERROR M219:
  Unable to find specified schema file in 'D:/GIT/devtools-external/build/tools/packchk/foo.xsd'

Log created on Fri Jun  2 10:31:18 2023

see https://github.com/Arm-Debug/devtools-external/pull/590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue is fixed, please verify.
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants