MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / validate_environment

Function validate_environment

Tests/SdkIntegration/tactility.py:191–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189#region Validation
190
191def validate_environment():
192 if os.environ.get("IDF_PATH") is None:
193 if sys.platform == "win32":
194 exit_with_error("Cannot find the Espressif IDF SDK. Ensure it is installed and that it is activated via %IDF_PATH%\\export.ps1")
195 else:
196 exit_with_error("Cannot find the Espressif IDF SDK. Ensure it is installed and that it is activated via $PATH_TO_IDF_SDK/export.sh")
197 if not os.path.exists("manifest.properties"):
198 exit_with_error("manifest.properties not found")
199 if use_local_sdk == False and os.environ.get("TACTILITY_SDK_PATH") is not None:
200 print_warning("TACTILITY_SDK_PATH is set, but will be ignored by this command.")
201 print_warning("If you want to use it, use the '--local-sdk' parameter")
202 elif use_local_sdk == True and os.environ.get("TACTILITY_SDK_PATH") is None:
203 exit_with_error("local build was requested, but TACTILITY_SDK_PATH environment variable is not set.")
204
205def validate_self(sdk_json):
206 if not "toolVersion" in sdk_json:

Callers 1

build_actionFunction · 0.85

Calls 4

existsMethod · 0.80
exit_with_errorFunction · 0.70
print_warningFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected