You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ha...@apache.org on 2024/08/01 16:24:28 UTC
(tsfile) branch code_coverage_v3 updated (eb628111 -> d3b6f9ac)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a change to branch code_coverage_v3
in repository https://gitbox.apache.org/repos/asf/tsfile.git
from eb628111 try python
add 8f17b99c Fix c++ code coverage didn't show cc files (#193)
add 5600e710 Bump org.codehaus.mojo:exec-maven-plugin from 1.6.0 to 3.3.0 (#189)
new dd9afdec Merge branch 'develop' of github.com:apache/tsfile into code_coverage_v3
new 732fea51 Add python test code cov
new d3b6f9ac try 1 try
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/unit-test.yml | 3 ++-
code-coverage/copy-code-coverage-sources.sh | 2 +-
pom.xml | 18 +++++++++---------
python/pom.xml | 20 ++++++++++++++++++--
python/test.py | 8 ++++----
5 files changed, 34 insertions(+), 17 deletions(-)
(tsfile) 02/03: Add python test code cov
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch code_coverage_v3
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit 732fea51c5743f505ace6307d451af2b0a0e8cf5
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Aug 1 23:43:01 2024 +0800
Add python test code cov
---
.github/workflows/code-coverage.yml | 3 +--
code-coverage/copy-code-coverage-sources.sh | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
index ec4813cd..3240ee0d 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -3,7 +3,6 @@ on:
push:
branches:
- develop
- - code_coverage_v3
paths-ignore:
- 'docs/**'
pull_request:
@@ -28,7 +27,7 @@ jobs:
- name: Generate code coverage reports
run: |
sudo apt-get install lcov
- ./mvnw -B -P with-cpp,with-python,with-code-coverage clean verify
+ ./mvnw -B -P with-java,with-cpp,with-python,with-code-coverage clean verify
lcov --capture --directory cpp/target/build/test --output-file cpp/target/build/test/coverage.info
lcov --remove cpp/target/build/test/coverage.info '*/tsfile/cpp/test/*' --output-file cpp/target/build/test/coverage_filtered.info
genhtml cpp/target/build/test/coverage_filtered.info --output-directory cpp/target/build/test/coverage_report
diff --git a/code-coverage/copy-code-coverage-sources.sh b/code-coverage/copy-code-coverage-sources.sh
index bf92f850..19c24fd1 100755
--- a/code-coverage/copy-code-coverage-sources.sh
+++ b/code-coverage/copy-code-coverage-sources.sh
@@ -17,15 +17,15 @@
# specific language governing permissions and limitations
# under the License.
#
-#
-#for file in ../java/*/target/*.exec
-#do
-# cp $file ./target/
-#done
-#
-#for file in ../java/*/target/classes
-#do
-# echo "copy from" ${file}
-# cp -r $file ./target/
-#done
+
+for file in ../java/*/target/*.exec
+do
+ cp $file ./target/
+done
+
+for file in ../java/*/target/classes
+do
+ echo "copy from" ${file}
+ cp -r $file ./target/
+done
(tsfile) 01/03: Merge branch 'develop' of github.com:apache/tsfile into code_coverage_v3
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch code_coverage_v3
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit dd9afdec49410e64fb0e95ab37ca11681bea143b
Merge: eb628111 5600e710
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Aug 1 23:41:39 2024 +0800
Merge branch 'develop' of github.com:apache/tsfile into code_coverage_v3
pom.xml | 18 +++++++++---------
python/pom.xml | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
(tsfile) 03/03: try 1 try
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch code_coverage_v3
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit d3b6f9ac00431aa2eac553d01faa47ecbc7e491e
Author: HTHou <hh...@outlook.com>
AuthorDate: Fri Aug 2 00:24:13 2024 +0800
try 1 try
---
.github/workflows/code-coverage.yml | 3 ++-
.github/workflows/unit-test.yml | 3 ++-
code-coverage/copy-code-coverage-sources.sh | 20 ++++++++++----------
python/pom.xml | 18 +++++++++++++++++-
python/test.py | 8 ++++----
5 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
index 3240ee0d..ec4813cd 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -3,6 +3,7 @@ on:
push:
branches:
- develop
+ - code_coverage_v3
paths-ignore:
- 'docs/**'
pull_request:
@@ -27,7 +28,7 @@ jobs:
- name: Generate code coverage reports
run: |
sudo apt-get install lcov
- ./mvnw -B -P with-java,with-cpp,with-python,with-code-coverage clean verify
+ ./mvnw -B -P with-cpp,with-python,with-code-coverage clean verify
lcov --capture --directory cpp/target/build/test --output-file cpp/target/build/test/coverage.info
lcov --remove cpp/target/build/test/coverage.info '*/tsfile/cpp/test/*' --output-file cpp/target/build/test/coverage_filtered.info
genhtml cpp/target/build/test/coverage_filtered.info --output-directory cpp/target/build/test/coverage_report
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 93e95a80..ea7e0cd3 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -8,6 +8,7 @@ on:
branches:
- develop
- iotdb
+ - code_coverage_v3
paths-ignore:
- 'docs/**'
pull_request:
@@ -81,4 +82,4 @@ jobs:
- name: Build and test with Maven
shell: bash
run: |
- ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} -P with-java,with-cpp,with-python clean verify
+ ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} -P with-cpp,with-python clean verify
diff --git a/code-coverage/copy-code-coverage-sources.sh b/code-coverage/copy-code-coverage-sources.sh
index 19c24fd1..7c6361fe 100755
--- a/code-coverage/copy-code-coverage-sources.sh
+++ b/code-coverage/copy-code-coverage-sources.sh
@@ -18,14 +18,14 @@
# under the License.
#
-for file in ../java/*/target/*.exec
-do
- cp $file ./target/
-done
-
-for file in ../java/*/target/classes
-do
- echo "copy from" ${file}
- cp -r $file ./target/
-done
+#for file in ../java/*/target/*.exec
+#do
+# cp $file ./target/
+#done
+#
+#for file in ../java/*/target/classes
+#do
+# echo "copy from" ${file}
+# cp -r $file ./target/
+#done
diff --git a/python/pom.xml b/python/pom.xml
index 63a3689f..0efca65c 100644
--- a/python/pom.xml
+++ b/python/pom.xml
@@ -107,6 +107,22 @@
</arguments>
</configuration>
</execution>
+ <execution>
+ <id>python-install-test-requirements</id>
+ <phase>process-test-resources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>${python.venv.bin}${python.exe.bin}</executable>
+ <arguments>
+ <argument>-m</argument>
+ <argument>pip</argument>
+ <argument>install</argument>
+ <argument>pytest</argument>
+ </arguments>
+ </configuration>
+ </execution>
<execution>
<id>run-python-tests</id>
<phase>test</phase>
@@ -114,7 +130,7 @@
<goal>exec</goal>
</goals>
<configuration>
- <executable>${python.venv.bin}${python.exe.bin}</executable>
+ <executable>${python.venv.bin}pytest</executable>
<arguments>
<argument>${project.basedir}/test.py</argument>
</arguments>
diff --git a/python/test.py b/python/test.py
index e4838742..a2d41bd2 100644
--- a/python/test.py
+++ b/python/test.py
@@ -29,7 +29,7 @@ import tsfile as ts
from tsfile.tsfile import EmptyFileError
TABLE_NAME = "test_table"
-DATA_PATH = os.path.join(os.path.dirname(__file__), "data")
+DATA_PATH = os.path.join(os.path.dirname(__file__), "target")
# test writing data
@@ -73,9 +73,9 @@ def test_write_tsfile():
# test reading data
def test_read_tsfile():
- # skip test on windows because of the bug in the tsfile library
- if platform.system() == "Windows":
- return
+ # # skip test on windows because of the bug in the tsfile library
+ # if platform.system() == "Windows":
+ # return
# test read a non-existent file
with ut.TestCase().assertRaises(FileNotFoundError):
ts.read_tsfile(DATA_PATH + "/notexist.tsfile", TABLE_NAME, ["level", "num"])