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

Fix add_test calls and change temporary file creation. #1522

Merged
merged 9 commits into from
Nov 4, 2021
Merged

Fix add_test calls and change temporary file creation. #1522

merged 9 commits into from
Nov 4, 2021

Conversation

patlefort
Copy link
Contributor

Followup from my previous PR (#1487)

  • Fix add_test in cmake files. This notation allows it to understand that the command portion is a target and to translate it to the proper executable.
  • Remove starting backslash if present from temporary filename. A starting backslash mean that it is safe to create it in the current working directory.
  • Implement a public TempFile class.
  • Change relevant tests to use TempFile class.

I've implemented a public TempFile class. I've put it in the OCIO namespace, is it fine? Should I put it in the Platform namespace? Also, GPUHelpers.h/cpp are left empty, should they be removed?

Signed-off-by: Patrick Northon northon_patrick3@yahoo.ca

…that the command portion is a target and to translate it to the proper executable.

* Remove starting backslash if present from temporary filename. A starting backslash mean that it is safe to create it in the current working directory.
* Implement a public TempFile class.
* Change relevant tests to use TempFile class.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
Copy link
Collaborator

@remia remia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up work @patlefort.

src/OpenColorIO/Platform.cpp Show resolved Hide resolved
include/OpenColorIO/OpenColorIO.h Outdated Show resolved Hide resolved
tests/cpu/transforms/CDLTransform_tests.cpp Outdated Show resolved Hide resolved
include/OpenColorIO/OpenColorIO.h Outdated Show resolved Hide resolved
src/OpenColorIO/Platform.cpp Outdated Show resolved Hide resolved
include/OpenColorIO/OpenColorIO.h Outdated Show resolved Hide resolved
hodoulp and others added 3 commits October 27, 2021 08:41
* Add comment on temporary file functions fix.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
@patlefort
Copy link
Contributor Author

test 1
    Start 1: test_utils_exec
Test not available without configuration.  (Missing "-C <config>"?)

I think the workflow running the tests is missing an option: tests running with ctest should have the option -C <config> so tests on multi-configuration generators can run properly. Or maybe run cmake --build . --target test --config <config>.

@patlefort
Copy link
Contributor Author

Using ctest -V -C ${{ matrix.build-type }} work fine: https://github.com/patlefort/OpenColorIO/actions/runs/1393147487

@remia
Copy link
Collaborator

remia commented Oct 28, 2021

For some reasons it looks like it was working correctly before the update to the add_test commands. I think you can go ahead and add the -C flag to the ctest calls like you propose.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
@remia
Copy link
Collaborator

remia commented Oct 31, 2021

@patlefort Could you also add the ctest -C flag to the analysis_workflow.yml file (hard-coded to Release) so that this doesn't break? I believe it is then ready for merge.

@hodoulp hodoulp merged commit ce85939 into AcademySoftwareFoundation:main Nov 4, 2021
hodoulp added a commit that referenced this pull request Nov 4, 2021
* * Fix add_test in cmake files. This notation allows it to understand that the command portion is a target and to translate it to the proper executable.
* Remove starting backslash if present from temporary filename. A starting backslash mean that it is safe to create it in the current working directory.
* Implement a public TempFile class.
* Change relevant tests to use TempFile class.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* * Revert back changes for TempFile class.
* Add comment on temporary file functions fix.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add FIXME comments.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add -C flag to ctest commands.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add `-C Release` to ctest commands in `analysis_workflow.yml`.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
hodoulp added a commit that referenced this pull request Nov 4, 2021
* * Fix add_test in cmake files. This notation allows it to understand that the command portion is a target and to translate it to the proper executable.
* Remove starting backslash if present from temporary filename. A starting backslash mean that it is safe to create it in the current working directory.
* Implement a public TempFile class.
* Change relevant tests to use TempFile class.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* * Revert back changes for TempFile class.
* Add comment on temporary file functions fix.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add FIXME comments.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add -C flag to ctest commands.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add `-C Release` to ctest commands in `analysis_workflow.yml`.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
hodoulp added a commit that referenced this pull request Nov 5, 2021
* * Fix add_test in cmake files. This notation allows it to understand that the command portion is a target and to translate it to the proper executable.
* Remove starting backslash if present from temporary filename. A starting backslash mean that it is safe to create it in the current working directory.
* Implement a public TempFile class.
* Change relevant tests to use TempFile class.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* * Revert back changes for TempFile class.
* Add comment on temporary file functions fix.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add FIXME comments.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add -C flag to ctest commands.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

* Add `-C Release` to ctest commands in `analysis_workflow.yml`.

Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

Co-authored-by: patlefort <northon_patrick3@yahoo.ca>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
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.

3 participants