Skip to content

Commit

Permalink
adding test
Browse files Browse the repository at this point in the history
  • Loading branch information
Archermmt committed Aug 9, 2023
1 parent d740d76 commit a0ec889
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/scripts/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,19 @@ def add_subparser(
),
},
),
generate_command(
name="msc",
help="Run MSC build and test(s)",
options={
"cpp": CPP_UNITTEST,
"test": (
"run MSC API/Python tests",
[
"./tests/scripts/task_python_msc.sh",
],
),
},
),
]


Expand Down
27 changes: 27 additions & 0 deletions tests/scripts/task_config_build_msc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

set -euxo pipefail

BUILD_DIR=$1
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
cp ../cmake/config.cmake .

echo set\(MSC ON\) >> config.cmake
echo set\(USE_LLVM ON\) >> config.cmake
30 changes: 30 additions & 0 deletions tests/scripts/task_python_msc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Test frontends that only need CPU resources
set -euxo pipefail

source tests/scripts/setup-pytest-env.sh

# Rebuild cython
make cython3

# cleanup pycache
find . -type f -path "*.pyc" | xargs rm -f

run_pytest cython python-contrib-msc tests/python/contrib/test_msc

0 comments on commit a0ec889

Please sign in to comment.