Skip to content

Commit

Permalink
Update tests to fix CI errors
Browse files Browse the repository at this point in the history
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
  • Loading branch information
AyanSinhaMahapatra committed Oct 10, 2023
1 parent e50169f commit 366a11c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 24 deletions.
7 changes: 7 additions & 0 deletions src/licensedcode/data/rules/mit_1301.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
license_expression: mit
is_license_tag: yes
is_continuous: yes
---

{{"license": "type": "MIT",}}
10 changes: 7 additions & 3 deletions tests/formattedcode/data/common/manifests-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ headers:
system_environment:
operating_system: linux
cpu_architecture: 64
platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.29
platform_version: '#83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023'
platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.29
platform_version: '#93~20.04.1-Ubuntu SMP Wed Sep 6 16:15:40 UTC 2023'
python_version: "3.8.10 (default, May 26 2023, 14:05:08) \n[GCC 9.4.0]"
spdx_license_list_version: '3.21'
files_count: 4
Expand Down Expand Up @@ -1043,7 +1043,11 @@ license_references:
is_unknown: no
is_generic: no
spdx_license_key: MIT
other_spdx_license_keys: []
other_spdx_license_keys:
- LicenseRef-MIT-Bootstrap
- LicenseRef-MIT-Discord
- LicenseRef-MIT-TC
- LicenseRef-MIT-Diehl
osi_license_key:
text_urls:
- http://opensource.org/licenses/mit-license.php
Expand Down
10 changes: 7 additions & 3 deletions tests/formattedcode/data/yaml/package-and-licenses-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ headers:
system_environment:
operating_system: linux
cpu_architecture: 64
platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.29
platform_version: '#83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023'
platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.29
platform_version: '#93~20.04.1-Ubuntu SMP Wed Sep 6 16:15:40 UTC 2023'
python_version: "3.8.10 (default, May 26 2023, 14:05:08) \n[GCC 9.4.0]"
spdx_license_list_version: '3.21'
files_count: 4
Expand Down Expand Up @@ -322,7 +322,11 @@ license_references:
is_unknown: no
is_generic: no
spdx_license_key: MIT
other_spdx_license_keys: []
other_spdx_license_keys:
- LicenseRef-MIT-Bootstrap
- LicenseRef-MIT-Discord
- LicenseRef-MIT-TC
- LicenseRef-MIT-Diehl
osi_license_key:
text_urls:
- http://opensource.org/licenses/mit-license.php
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
license_expressions:
- x11-tiff
- mit-old-style-no-advert
- other-permissive
- generic-cla
- unknown-license-reference
- unknown-license-reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ license_expressions:
- unknown-license-reference
- proprietary-license
- proprietary-license
- proprietary-license
- warranty-disclaimer
- proprietary-license
- unknown-license-reference
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
license_expressions:
- mit
- mit
- embedthis-extension
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@
"is_unknown": false,
"is_generic": false,
"spdx_license_key": "MIT",
"other_spdx_license_keys": [],
"other_spdx_license_keys": [
"LicenseRef-MIT-Bootstrap",
"LicenseRef-MIT-Discord",
"LicenseRef-MIT-TC",
"LicenseRef-MIT-Diehl"
],
"osi_license_key": null,
"text_urls": [
"http://opensource.org/licenses/mit-license.php"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,12 @@
"is_unknown": false,
"is_generic": false,
"spdx_license_key": "MIT",
"other_spdx_license_keys": [],
"other_spdx_license_keys": [
"LicenseRef-MIT-Bootstrap",
"LicenseRef-MIT-Discord",
"LicenseRef-MIT-TC",
"LicenseRef-MIT-Diehl"
],
"osi_license_key": null,
"text_urls": [
"http://opensource.org/licenses/mit-license.php"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,21 @@
]
},
{
"identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d",
"identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e",
"license_expression": "apache-2.0",
"detection_count": 2,
"detection_log": []
},
{
"identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e",
"identifier": "apache_2_0-3972bfb2-eb21-3d0c-d862-1642babb9f95",
"license_expression": "apache-2.0",
"detection_count": 2,
"detection_count": 1,
"detection_log": []
},
{
"identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d",
"license_expression": "apache-2.0",
"detection_count": 1,
"detection_log": []
},
{
Expand Down Expand Up @@ -1448,21 +1454,21 @@
"license_expression": "apache-2.0",
"matches": [
{
"score": 100.0,
"start_line": 3,
"score": 74.36,
"start_line": 1,
"end_line": 13,
"matched_length": 85,
"match_coverage": 100.0,
"matcher": "2-aho",
"matched_length": 87,
"match_coverage": 74.36,
"matcher": "3-seq",
"license_expression": "apache-2.0",
"rule_identifier": "apache-2.0_7.RULE",
"rule_identifier": "apache-2.0_1297.RULE",
"rule_relevance": 100,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_7.RULE",
"matched_text": "Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License."
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1297.RULE",
"matched_text": "All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this [file] except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License."
}
],
"detection_log": [],
"identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d"
"identifier": "apache_2_0-3972bfb2-eb21-3d0c-d862-1642babb9f95"
},
{
"license_expression": "apache-2.0",
Expand Down Expand Up @@ -1499,7 +1505,7 @@
}
],
"license_clues": [],
"percentage_of_license_text": 26.1,
"percentage_of_license_text": 26.65,
"scan_errors": []
}
]
Expand Down

0 comments on commit 366a11c

Please sign in to comment.