Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/UnitTest/TestTypes.h>
|
||||
@@ -95,4 +90,37 @@ namespace PythonBindingsExample
|
||||
EXPECT_TRUE(s_application->RunWithParameters(params));
|
||||
}
|
||||
|
||||
TEST_F(PythonBindingsExampleTest, Application_SystemExit_Blocked)
|
||||
{
|
||||
int exceptions = 0;
|
||||
int errors = 0;
|
||||
|
||||
s_application->GetErrorCount(exceptions, errors);
|
||||
ASSERT_EQ(exceptions, 0);
|
||||
ASSERT_EQ(errors, 0);
|
||||
|
||||
// expects a clean "error" from this statement
|
||||
// the whole program should not exit()
|
||||
{
|
||||
ApplicationParameters params;
|
||||
params.m_pythonStatement = "import sys; sys.exit(0)";
|
||||
EXPECT_FALSE(s_application->RunWithParameters(params));
|
||||
|
||||
s_application->GetErrorCount(exceptions, errors);
|
||||
EXPECT_EQ(exceptions, 0);
|
||||
EXPECT_GE(errors, 1);
|
||||
}
|
||||
s_application->ResetErrorCount();
|
||||
|
||||
// should be able to run more statements
|
||||
{
|
||||
ApplicationParameters params;
|
||||
params.m_pythonStatement = "import sys";
|
||||
EXPECT_TRUE(s_application->RunWithParameters(params));
|
||||
|
||||
s_application->GetErrorCount(exceptions, errors);
|
||||
EXPECT_EQ(exceptions, 0);
|
||||
EXPECT_EQ(errors, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/Platform/PlatformDefaults.h>
|
||||
#include <AzCore/std/smart_ptr/make_shared.h>
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
REM its licensors.
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project
|
||||
REM
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this
|
||||
REM distribution (the "License"). All use of this software is governed by the License,
|
||||
REM or, if provided, by the license below or the license accompanying this file. Do not
|
||||
REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
PUSHD "%~dp0"
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
"""
|
||||
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
its licensors.
|
||||
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 (the "License"). All use of this software is governed by the License,
|
||||
or, if provided, by the license below or the license accompanying this file. Do not
|
||||
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
"""
|
||||
print ('Testing framework Python bindings')
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
"""
|
||||
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
its licensors.
|
||||
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 (the "License"). All use of this software is governed by the License,
|
||||
or, if provided, by the license below or the license accompanying this file. Do not
|
||||
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
"""
|
||||
import azlmbr
|
||||
print ('Able to load azlmbr module.')
|
||||
|
||||
Reference in New Issue
Block a user