Implemented Support to allow project's to reference gems via the gem name (#7109)
* Implemented Support to allow project's to reference gems via the gem name Updated the enable-gem command to add the name of the enabled gem to the "gem_names" array in the project.json Updated the enable-gem test to validate this functionality Centralized the CMake logic for locating external subdirectories to the Subdirectories.cmake script Added an option to the edit-project-properties and edit-engine-properties o3de.py commands to add/remove/replace the "gem_names" field in the project.json and engine.json respectively Added a CMake function to determine the root CMake "subdirectory" of any input path which is a parent of it. This logic has been used to improve the installation of external gems to the <install-root>/External directory. Tested out the install layout before submitting PR fixes #7108 Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Fixed the enable-gem test on Linux to resolve the mock path. Renamed all of the o3de python test from "unit_test*.py" to "test*.py" to faciliate the python unittest module picking up the test automatically. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding test for the disable_gem command. Fixed some typos in engine_properties.py scrip. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>monroegm-disable-blank-issue-2
parent
d605b5636d
commit
62775add6d
@ -0,0 +1,197 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
include_guard()
|
||||
|
||||
################################################################################
|
||||
# Subdirectory processing
|
||||
################################################################################
|
||||
|
||||
# this function is building up the LY_EXTERNAL_SUBDIRS global property
|
||||
function(add_engine_gem_json_external_subdirectories gem_path)
|
||||
set(gem_json_path ${gem_path}/gem.json)
|
||||
if(EXISTS ${gem_json_path})
|
||||
read_json_external_subdirs(gem_external_subdirs ${gem_path}/gem.json)
|
||||
foreach(gem_external_subdir ${gem_external_subdirs})
|
||||
file(REAL_PATH ${gem_external_subdir} real_external_subdir BASE_DIRECTORY ${gem_path})
|
||||
|
||||
# Append external subdirectory if it is not in global property
|
||||
get_property(current_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
|
||||
if(NOT real_external_subdir IN_LIST current_external_subdirs)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir})
|
||||
# Also append the project external subdirectores to the LY_EXTERNAL_SUBDIRS_ENGINE property
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS_ENGINE ${real_external_subdir})
|
||||
add_engine_gem_json_external_subdirectories(${real_external_subdir})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(add_engine_json_external_subdirectories)
|
||||
set(engine_json_path ${LY_ROOT_FOLDER}/engine.json)
|
||||
if(EXISTS ${engine_json_path})
|
||||
read_json_external_subdirs(engine_external_subdirs ${engine_json_path})
|
||||
foreach(engine_external_subdir ${engine_external_subdirs})
|
||||
file(REAL_PATH ${engine_external_subdir} real_external_subdir BASE_DIRECTORY ${LY_ROOT_FOLDER})
|
||||
|
||||
# Append external subdirectory if it is not in global property
|
||||
get_property(current_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
|
||||
if(NOT real_external_subdir IN_LIST current_external_subdirs)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir})
|
||||
# Also append the project external subdirectores to the LY_EXTERNAL_SUBDIRS_ENGINE property
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS_ENGINE ${real_external_subdir})
|
||||
add_engine_gem_json_external_subdirectories(${real_external_subdir})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
function(add_project_gem_json_external_subdirectories gem_path project_name)
|
||||
set(gem_json_path ${gem_path}/gem.json)
|
||||
if(EXISTS ${gem_json_path})
|
||||
read_json_external_subdirs(gem_external_subdirs ${gem_path}/gem.json)
|
||||
foreach(gem_external_subdir ${gem_external_subdirs})
|
||||
file(REAL_PATH ${gem_external_subdir} real_external_subdir BASE_DIRECTORY ${gem_path})
|
||||
|
||||
# Append external subdirectory if it is not in global property
|
||||
get_property(current_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
|
||||
if(NOT real_external_subdir IN_LIST current_external_subdirs)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir})
|
||||
# Also append the project external subdirectores to the LY_EXTERNAL_SUBDIRS_${project_name} property
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS_${project_name} ${real_external_subdir})
|
||||
add_project_gem_json_external_subdirectories(${real_external_subdir} "${project_name}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(add_project_json_external_subdirectories project_path project_name)
|
||||
set(project_json_path ${project_path}/project.json)
|
||||
if(EXISTS ${project_json_path})
|
||||
read_json_external_subdirs(project_external_subdirs ${project_path}/project.json)
|
||||
foreach(project_external_subdir ${project_external_subdirs})
|
||||
file(REAL_PATH ${project_external_subdir} real_external_subdir BASE_DIRECTORY ${project_path})
|
||||
|
||||
# Append external subdirectory if it is not in global property
|
||||
get_property(current_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
|
||||
if(NOT real_external_subdir IN_LIST current_external_subdirs)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir})
|
||||
# Also append the project external subdirectores to the LY_EXTERNAL_SUBDIRS_${project_name} property
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS_${project_name} ${real_external_subdir})
|
||||
add_project_gem_json_external_subdirectories(${real_external_subdir} "${project_name}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
#! add_o3de_manifest_gem_json_external_subdirectories : Recurses through external subdirectories
|
||||
#! originally found in the add_o3de_manifest_json_external_subdirectories command
|
||||
function(add_o3de_manifest_gem_json_external_subdirectories gem_path)
|
||||
set(gem_json_path ${gem_path}/gem.json)
|
||||
if(EXISTS ${gem_json_path})
|
||||
read_json_external_subdirs(gem_external_subdirs ${gem_path}/gem.json)
|
||||
foreach(gem_external_subdir ${gem_external_subdirs})
|
||||
file(REAL_PATH ${gem_external_subdir} real_external_subdir BASE_DIRECTORY ${gem_path})
|
||||
|
||||
# Append external subdirectory ONLY to LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST PROPERTY
|
||||
# It is not appended to LY_EXTERNAL_SUBDIRS unless that gem is used by the project
|
||||
get_property(current_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST)
|
||||
if(NOT real_external_subdir IN_LIST current_external_subdirs)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST ${real_external_subdir})
|
||||
add_o3de_manifest_gem_json_external_subdirectories(${real_external_subdir})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#! add_o3de_manifest_json_external_subdirectories : Adds the list of external_subdirectories
|
||||
#! in the user o3de_manifest.json to the LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST property
|
||||
function(add_o3de_manifest_json_external_subdirectories)
|
||||
o3de_get_manifest_path(manifest_path)
|
||||
if(EXISTS ${manifest_path})
|
||||
read_json_external_subdirs(o3de_manifest_external_subdirs ${manifest_path})
|
||||
foreach(manifest_external_subdir ${o3de_manifest_external_subdirs})
|
||||
file(REAL_PATH ${manifest_external_subdir} real_external_subdir BASE_DIRECTORY ${LY_ROOT_FOLDER})
|
||||
|
||||
# Append external subdirectory ONLY to LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST PROPERTY
|
||||
# It is not appended to LY_EXTERNAL_SUBDIRS unless that gem is used by the project
|
||||
get_property(current_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST)
|
||||
if(NOT real_external_subdir IN_LIST current_external_subdirs)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST ${real_external_subdir})
|
||||
add_o3de_manifest_gem_json_external_subdirectories(${real_external_subdir})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#! Gather unique_list of all external subdirectories that is union
|
||||
#! of the engine.json, project.json, o3de_manifest.json and any gem.json files found visiting
|
||||
function(get_all_external_subdirectories output_subdirs)
|
||||
get_property(all_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
|
||||
get_property(manifest_external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS_O3DE_MANIFEST)
|
||||
list(APPEND all_external_subdirs ${manifest_external_subdirs})
|
||||
list(REMOVE_DUPLICATES all_external_subdirs)
|
||||
set(${output_subdirs} ${all_external_subdirs} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
#! add_registered_gems_to_external_subdirs:
|
||||
#! Accepts a list of gem_names (which can be read from the project.json or engine.json)
|
||||
#! and cross checks them against union of all external subdirectories to determine the gem path.
|
||||
#! If that gem exist it is appended to LY_EXTERNAL_SUBDIRS so that that the build generator
|
||||
#! adds to the generated build project.
|
||||
#! Otherwise a fatal error is logged indicating that is not gem could not be found in the list of external subdirectories
|
||||
function(add_registered_gems_to_external_subdirs gem_names)
|
||||
if (gem_names)
|
||||
get_all_external_subdirectories(all_external_subdirs)
|
||||
foreach(gem_name IN LISTS gem_names)
|
||||
unset(gem_path)
|
||||
o3de_find_gem(${gem_name} gem_path)
|
||||
if (gem_path)
|
||||
set_property(GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS ${gem_path} APPEND)
|
||||
else()
|
||||
list(JOIN all_external_subdirs "\n" external_subdirs_formatted)
|
||||
message(SEND_ERROR "The gem \"${gem_name}\" from the \"gem_names\" field in the engine.json/project.json "
|
||||
" could not be found in any gem.json from the following list of registered external subdirectories:\n"
|
||||
"${external_subdirs_formatted}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(add_subdirectory_on_external_subdirs)
|
||||
# Lookup the paths of "gem_names" array all project.json files and engine.json
|
||||
# and append them to the LY_EXTERNAL_SUBDIRS property
|
||||
foreach(project ${LY_PROJECTS})
|
||||
file(REAL_PATH ${project} full_directory_path BASE_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
o3de_read_json_array(gem_names ${full_directory_path}/project.json "gem_names")
|
||||
add_registered_gems_to_external_subdirs("${gem_names}")
|
||||
endforeach()
|
||||
o3de_read_json_array(gem_names ${LY_ROOT_FOLDER}/engine.json "gem_names")
|
||||
add_registered_gems_to_external_subdirs("${gem_names}")
|
||||
|
||||
get_property(external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
|
||||
list(APPEND LY_EXTERNAL_SUBDIRS ${external_subdirs})
|
||||
list(REMOVE_DUPLICATES LY_EXTERNAL_SUBDIRS)
|
||||
# Loop over the additional external subdirectories and invoke add_subdirectory on them
|
||||
foreach(external_directory ${LY_EXTERNAL_SUBDIRS})
|
||||
# Hash the external_directory name and append it to the Binary Directory section of add_subdirectory
|
||||
# This is to deal with potential situations where multiple external directories has the same last directory name
|
||||
# For example if D:/Company1/RayTracingGem and F:/Company2/Path/RayTracingGem were both added as a subdirectory
|
||||
file(REAL_PATH ${external_directory} full_directory_path)
|
||||
string(SHA256 full_directory_hash ${full_directory_path})
|
||||
# Truncate the full_directory_hash down to 8 characters to avoid hitting the Windows 260 character path limit
|
||||
# when the external subdirectory contains relative paths of significant length
|
||||
string(SUBSTRING ${full_directory_hash} 0 8 full_directory_hash)
|
||||
# Use the last directory as the suffix path to use for the Binary Directory
|
||||
cmake_path(GET external_directory FILENAME directory_name)
|
||||
add_subdirectory(${external_directory} ${CMAKE_BINARY_DIR}/External/${directory_name}-${full_directory_hash})
|
||||
endforeach()
|
||||
endfunction()
|
||||
@ -0,0 +1,200 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
import pathlib
|
||||
from unittest.mock import patch
|
||||
|
||||
from o3de import cmake, disable_gem, enable_gem
|
||||
|
||||
|
||||
TEST_PROJECT_JSON_PAYLOAD = '''
|
||||
{
|
||||
"project_name": "TestProject",
|
||||
"origin": "The primary repo for TestProject goes here: i.e. http://www.mydomain.com",
|
||||
"license": "What license TestProject uses goes here: i.e. https://opensource.org/licenses/MIT",
|
||||
"display_name": "TestProject",
|
||||
"summary": "A short description of TestProject.",
|
||||
"canonical_tags": [
|
||||
"Project"
|
||||
],
|
||||
"user_tags": [
|
||||
"TestProject"
|
||||
],
|
||||
"icon_path": "preview.png",
|
||||
"engine": "o3de-install",
|
||||
"restricted_name": "projects",
|
||||
"external_subdirectories": [
|
||||
]
|
||||
}
|
||||
'''
|
||||
|
||||
TEST_GEM_JSON_PAYLOAD = '''
|
||||
{
|
||||
"gem_name": "TestGem",
|
||||
"display_name": "TestGem",
|
||||
"license": "Apache-2.0 Or MIT",
|
||||
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
|
||||
"origin": "Open 3D Engine - o3de.org",
|
||||
"origin_url": "https://github.com/o3de/o3de",
|
||||
"type": "Code",
|
||||
"summary": "A short description of TestGem.",
|
||||
"canonical_tags": [
|
||||
"Gem"
|
||||
],
|
||||
"user_tags": [
|
||||
"TestGem"
|
||||
],
|
||||
"icon_path": "preview.png",
|
||||
"requirements": "Any requirement goes here.",
|
||||
"documentation_url": "The link to the documentation goes here.",
|
||||
"dependencies": [
|
||||
]
|
||||
}
|
||||
'''
|
||||
|
||||
TEST_O3DE_MANIFEST_JSON_PAYLOAD = '''
|
||||
{
|
||||
"o3de_manifest_name": "testuser",
|
||||
"origin": "C:/Users/testuser/.o3de",
|
||||
"default_engines_folder": "C:/Users/testuser/.o3de/Engines",
|
||||
"default_projects_folder": "C:/Users/testuser/.o3de/Projects",
|
||||
"default_gems_folder": "C:/Users/testuser/.o3de/Gems",
|
||||
"default_templates_folder": "C:/Users/testuser/.o3de/Templates",
|
||||
"default_restricted_folder": "C:/Users/testuser/.o3de/Restricted",
|
||||
"default_third_party_folder": "C:/Users/testuser/.o3de/3rdParty",
|
||||
"projects": [
|
||||
"D:/MinimalProject"
|
||||
],
|
||||
"external_subdirectories": [],
|
||||
"templates": [],
|
||||
"restricted": [],
|
||||
"repos": [],
|
||||
"engines": [
|
||||
"D:/o3de/o3de"
|
||||
],
|
||||
"engines_path": {
|
||||
"o3de": "D:/o3de/o3de"
|
||||
}
|
||||
}
|
||||
'''
|
||||
|
||||
@pytest.fixture(scope='class')
|
||||
def init_disable_gem_data(request):
|
||||
class DisableGemData:
|
||||
def __init__(self):
|
||||
self.project_data = json.loads(TEST_PROJECT_JSON_PAYLOAD)
|
||||
self.gem_data = json.loads(TEST_GEM_JSON_PAYLOAD)
|
||||
request.cls.disable_gem = DisableGemData()
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('init_disable_gem_data')
|
||||
class TestDisableGemCommand:
|
||||
@pytest.mark.parametrize("gem_path, project_path, gem_registered_with_project, gem_registered_with_engine,"
|
||||
"expected_result", [
|
||||
pytest.param(pathlib.PurePath('TestProject/TestGem'), pathlib.PurePath('TestProject'), False, True, 0),
|
||||
pytest.param(pathlib.PurePath('TestProject/TestGem'), pathlib.PurePath('TestProject'), False, False, 0),
|
||||
pytest.param(pathlib.PurePath('TestProject/TestGem'), pathlib.PurePath('TestProject'), True, False, 0),
|
||||
pytest.param(pathlib.PurePath('TestGem'), pathlib.PurePath('TestProject'), False, False, 0),
|
||||
]
|
||||
)
|
||||
def test_disable_gem_registers_gem_name_with_project_json(self, gem_path, project_path, gem_registered_with_project,
|
||||
gem_registered_with_engine, expected_result):
|
||||
|
||||
project_gem_dependencies = []
|
||||
|
||||
def get_registered_path(project_name: str = None, gem_name: str = None) -> pathlib.Path or None:
|
||||
if project_name:
|
||||
return project_path
|
||||
elif gem_name:
|
||||
return gem_path
|
||||
return None
|
||||
|
||||
def save_o3de_manifest(new_project_data: dict, manifest_path: pathlib.Path = None) -> bool:
|
||||
if manifest_path == project_path / 'project.json':
|
||||
self.disable_gem.project_data = new_project_data
|
||||
return True
|
||||
|
||||
def load_o3de_manifest(manifest_path: pathlib.Path = None) -> dict or None:
|
||||
if not manifest_path:
|
||||
return json.loads(TEST_O3DE_MANIFEST_JSON_PAYLOAD)
|
||||
return None
|
||||
|
||||
def get_project_json_data(project_name: str = None, project_path: pathlib.Path = None):
|
||||
return self.disable_gem.project_data
|
||||
|
||||
def get_gem_json_data(gem_path: pathlib.Path, project_path: pathlib.Path):
|
||||
return self.disable_gem.gem_data
|
||||
|
||||
def get_project_gems(project_path: pathlib.Path):
|
||||
return [pathlib.Path(gem_path).resolve()] if gem_registered_with_project else []
|
||||
|
||||
def get_engine_gems():
|
||||
return [pathlib.Path(gem_path).resolve()] if gem_registered_with_engine else []
|
||||
|
||||
def add_gem_dependency(enable_gem_cmake_file: pathlib.Path, gem_name: str):
|
||||
project_gem_dependencies.append(gem_name)
|
||||
return 0
|
||||
|
||||
def remove_gem_dependency(enable_gem_cmake_file: pathlib.Path, gem_name: str):
|
||||
project_gem_dependencies.remove(gem_name)
|
||||
return 0
|
||||
|
||||
def get_enabled_gems(enable_gem_cmake_file: pathlib.Path) -> list:
|
||||
return project_gem_dependencies
|
||||
|
||||
|
||||
with patch('pathlib.Path.is_dir', return_value=True) as pathlib_is_dir_patch,\
|
||||
patch('pathlib.Path.is_file', return_value=True) as pathlib_is_file_patch, \
|
||||
patch('o3de.manifest.load_o3de_manifest', side_effect=load_o3de_manifest) as load_o3de_manifest_patch, \
|
||||
patch('o3de.manifest.save_o3de_manifest', side_effect=save_o3de_manifest) as save_o3de_manifest_patch,\
|
||||
patch('o3de.manifest.get_registered', side_effect=get_registered_path) as get_registered_patch,\
|
||||
patch('o3de.manifest.get_gem_json_data', side_effect=get_gem_json_data) as get_gem_json_data_patch,\
|
||||
patch('o3de.manifest.get_project_json_data', side_effect=get_project_json_data) as get_gem_json_data_patch,\
|
||||
patch('o3de.manifest.get_project_gems', side_effect=get_project_gems) as get_project_gems_patch,\
|
||||
patch('o3de.manifest.get_engine_gems', side_effect=get_engine_gems) as get_engine_gems_patch,\
|
||||
patch('o3de.cmake.add_gem_dependency', side_effect=add_gem_dependency) as add_gem_dependency_patch, \
|
||||
patch('o3de.cmake.remove_gem_dependency',
|
||||
side_effect=remove_gem_dependency) as remove_gem_dependency_patch, \
|
||||
patch('o3de.cmake.get_enabled_gems',
|
||||
side_effect=get_enabled_gems) as get_enabled_gems, \
|
||||
patch('o3de.validation.valid_o3de_gem_json', return_value=True) as valid_gem_json_patch:
|
||||
|
||||
# Clear out any "gem_names" from the previous iterations
|
||||
self.disable_gem.project_data.pop('gem_names', None)
|
||||
|
||||
# First enable the gem
|
||||
assert enable_gem.enable_gem_in_project(gem_path=gem_path, project_path=project_path) == 0
|
||||
|
||||
# Check that the gem is enabled
|
||||
gem_json = get_gem_json_data(gem_path, project_path)
|
||||
project_json = get_project_json_data(project_path=project_path)
|
||||
enabled_gems_list = cmake.get_enabled_gems(project_path / "Gem/enabled_gems.cmake")
|
||||
assert gem_json.get('gem_name', '') in enabled_gems_list
|
||||
|
||||
# If the gem that is neither registered in the project.json nor engine.json,
|
||||
# then it must appear in the "gem_names" field.
|
||||
if not gem_registered_with_engine and not gem_registered_with_project:
|
||||
assert gem_json.get('gem_name', '') in project_json.get('gem_names', [])
|
||||
else:
|
||||
assert gem_json.get('gem_name', '') not in project_json.get('gem_names', [])
|
||||
|
||||
# Now disable the gem
|
||||
result = disable_gem.disable_gem_in_project(gem_path=gem_path, project_path=project_path)
|
||||
assert result == expected_result
|
||||
|
||||
# Refresh the enabled_gems list and check for removal of the gem
|
||||
gem_json = get_gem_json_data(gem_path, project_path)
|
||||
project_json = get_project_json_data(project_path=project_path)
|
||||
enabled_gems_list = cmake.get_enabled_gems(project_path / "Gem/enabled_gems.cmake")
|
||||
assert gem_json.get('gem_name', '') not in enabled_gems_list
|
||||
|
||||
# If gem name should no longer appear in the "gem_names" field
|
||||
assert gem_json.get('gem_name', '') not in project_json.get('gem_names', [])
|
||||
Loading…
Reference in New Issue