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

Add --notgame arg that omits -game flag in runAutomationCommands #23

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dskvr
Copy link

@dskvr dskvr commented Jul 25, 2020

Problem
The automatic inclusion of the -game when calling the editor binary prevents use of ue4cli test with editor plugins.

Proposed solution
Include -game by default but enable its omission with a --notgame flag. Potentially Resolves #22

Notes

  • Explored multiple argument signatures
    • --enableeditor Was misleading because it implies that the "UnrealEditor" is disabled.
    • --editorplugin Was misleading because other arguments would likely need to be used in conjunction with this argument for editor plugins
    • --notgame Seemed to be the most concise (please subject to scrutiny)
  • Attempted to mimmic code-style.

@PaulHax test with

git clone https://github.com/dskvr/ue4cli && cd ue4cli
git checkout feature/editor-plugin-support
#check your python version is 3.x
python --version
python setup.py install
cd path/to/plugin/source
ue4 test --notgame EditorPluginName

@dskvr dskvr changed the title Add --enableeditor arg that omits -game flag in runAutomationCommands Add --notgame arg that omits -game flag in runAutomationCommands Jul 25, 2020
@PaulHax
Copy link

PaulHax commented Jul 27, 2020

Yes! This does it for me:
ue4 test --notgame MyEditorModuleTest

One slightly sad thing for another day perhaps:
ue4 test --notgame --list <- does not list MyEditorModuleTest because UnrealManagerBase::listAutomationTests() does not call UnrealManagerBase::runAutomationCommands(..., disableGameArg=True)

@dskvr
Copy link
Author

dskvr commented Jul 27, 2020

@PaulHax At first glance that appears to be because UnrealManagerBase::listAutomationTests() looks for .uproject files and not .uplugin files.

@dskvr
Copy link
Author

dskvr commented Aug 15, 2020

@adamrehn Is there any chance of this making it into ue4cli?

@adamrehn
Copy link
Owner

Apologies for the delay in responding to this pull request, I've been inordinately busy over the past couple of months and I'm only now making my way through my GitHub backlog.

Please see my comment #22 (comment) for details of why I've avoided providing an option to disable passing the -game flag to the Unreal Editor when running automation tests. I'll revisit this pull request once I've found a solution that is able to robustly run automation tests both with and without the -game flag across multiple platforms and versions of the Unreal Engine.

@adamrehn adamrehn self-assigned this Aug 24, 2020
@dskvr
Copy link
Author

dskvr commented Aug 25, 2020

@adamrehn Thanks for the response, we'll likely maintain our own fork during the interim as the modification is behaving as expected in our limited use case.

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.

Run tests in Editor type modules
3 participants