asifurrouf / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

Espresso fails Chromium's license check #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Espresso fails Chromium's license check.  This is also tracked in a Chromium 
bug: crbug.com/468341

Note that Chromium's licensecheck.pl has been forked from Debian - the impact 
of the bug spans beyond Chromium (i.e. Espresso would most likely also fail 
Debian's license check).

To fix, please add a copyright/license header to .java source files.

To repro and/or verify the fix, please get licensecheck.pl (*) and run it 
against Espresso - for example:

$ third_party/devscripts/licensecheck.pl -l 100 -r third_party/espresso/
... reports lots of .java source files with no copyright/license header ...
$ third_party/devscripts/licensecheck.pl -l 100 -r third_party/espresso/ | cut 
-c 1-45 | sort | uniq | sed -s 's/[^/]*$//g'
third_party/espresso/src/espresso/contrib/
third_party/espresso/src/espresso/
third_party/espresso/src/espresso/lib/src/
third_party/espresso/src/espresso/libtests/
third_party/espresso/src/testapp/src/main/
third_party/espresso/src/testapp_test/src/
third_party/espresso/src/testrunner-runtime/
third_party/espresso/src/testrunner/src/main/

(*) instructions for getting Chromium sources: 
http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/
html/depot_tools_tutorial.html#_setting_up

Original issue reported on code.google.com by luka...@chromium.org on 18 Mar 2015 at 5:05

GoogleCodeExporter commented 9 years ago
BTW: IANAL, but examples of copyright/license headers used in .java files in 
Chromium can be found below:

- Other java code in Chromium's third_party licensed under Apache License 2.0 
(Espresso's license): 
https://code.google.com/p/chromium/codesearch#search/&q=Apache%20license%20file:
%5C.java&sq=package:chromium&type=cs

- Chromium's java code: 
https://code.google.com/p/chromium/codesearch#search/&q=%22The%20Chromium%20Auth
ors%22%20file:%5C.java&sq=package:chromium&type=cs

Original comment by luka...@chromium.org on 18 Mar 2015 at 5:27

GoogleCodeExporter commented 9 years ago
Espresso is part of the Android Open Source Project and all java sources 
include a license header: 

/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed 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.
 */

I'm not sure whether it's expected to pass chromium's license check.

Original comment by vale...@google.com on 18 Mar 2015 at 5:44

GoogleCodeExporter commented 9 years ago
RE: #2: all java sources include a license header

This is not true - for example see:
https://code.google.com/p/android-test-kit/source/browse/espresso/lib/src/main/j
ava/com/google/android/apps/common/testing/ui/espresso/Espresso.java

If I should not be using git+https://code.google.com/p/android-test-kit/ to get 
Espresso sources, then can you please point me to the right public git 
repository I should use instead?

Original comment by luka...@chromium.org on 18 Mar 2015 at 6:36

GoogleCodeExporter commented 9 years ago
Please see the attached file for a list of Espresso sources that 
checklicenses.py complains about.

Original comment by luka...@chromium.org on 10 Jun 2015 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
I verified that the header / java comment provided in #2 works (i.e. after 
adding such header to 
third_party/espresso/src/espresso/lib/src/main/java/com/google/android/apps/comm
on/testing/ui/espresso/FailureHandler.java this particular .java file was no 
longer reported by checklicenses.py tool).

Original comment by luka...@chromium.org on 10 Jun 2015 at 7:00