Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
65c1566
Remove subfolder
DeepDiver1975 Jul 18, 2016
7730fad
Add 3rdparty libraries to core composer
DeepDiver1975 Jul 18, 2016
24395d4
No longer load autoloader from 3rdparty
DeepDiver1975 Jul 18, 2016
f11921a
Fix require in OCPSinceChecker
DeepDiver1975 Jul 18, 2016
ea611d0
Remove strict mode from phpunit.xml
DeepDiver1975 Jul 18, 2016
68b9464
Adding lib/composer to .gitignore - devs need to run make to get comp…
DeepDiver1975 Aug 18, 2016
f94b68c
Fix unit tests to match sabre vobject version
DeepDiver1975 Aug 19, 2016
6776772
Use explicit version of cssmin instead of master branch
DeepDiver1975 Aug 19, 2016
c28655c
Update guzzle to 5.3.1
Aug 22, 2016
9be1f95
Fixing composer calls
DeepDiver1975 Aug 23, 2016
b2b4fdc
Fix makefile deps
Aug 24, 2016
ba088b2
Moved JS tests to Makefile
Aug 24, 2016
f9039a1
Added bower deps in Makefile
Aug 24, 2016
9ff3b23
Fix makefile
Aug 24, 2016
00d2089
Fix composer phar dep
Aug 24, 2016
037b39b
Remove bogus composer files
Aug 24, 2016
ed0a179
bye bye hhvm
DeepDiver1975 Aug 24, 2016
5989cac
Move php-lint to Makefile
DeepDiver1975 Aug 24, 2016
3f91bd4
Fix test-js
Aug 24, 2016
8754370
Adjust Jenkinsfile for JS tests
Aug 24, 2016
cd0125c
Bye-bye php 5.4 & 5.5
DeepDiver1975 Aug 24, 2016
38265f9
Move autotest*.sh and buildjsdoc.sh into build sub folder
DeepDiver1975 Aug 24, 2016
f99019b
Adjusted versions in bower.json
Aug 24, 2016
b952f1c
Fix bower deps to have fixed versions
Aug 24, 2016
e8268b9
Fixed autotest scripts, added jsdoc rule
Aug 24, 2016
eb81932
Added integration tests in Makefile
Aug 24, 2016
bb6ff8d
Fix for test-js makefile dep + other
Aug 24, 2016
c903afe
Makefile vars and adjusted Jenkinsfile
Aug 25, 2016
ff373ee
Add make command to update license file headers
DeepDiver1975 Aug 25, 2016
308df14
Small tweaks in makefile
Aug 26, 2016
5b859b3
Add phpunit from composer
Aug 26, 2016
f091aca
Fix composer autoloader
Aug 26, 2016
3eb54d6
Fixed Makefile dependencies to only build them once
Aug 26, 2016
2170387
Makefile: separate dev and release deps
Aug 26, 2016
b6bacfa
Fix travis
DeepDiver1975 Aug 29, 2016
07f7fcb
Handle error when composer was not called
DeepDiver1975 Aug 29, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/config/mount.php
/apps/inc.php
/assets
/build/composer.phar
/core/vendor

# ignore all apps except core ones
/apps*/*
Expand All @@ -31,7 +33,7 @@
/apps/files_external/3rdparty/irodsphp/prods/test*
/apps/files_external/tests/config.*.php


/lib/composer

# ignore themes except the example and the README
/themes/*
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: false
language: php
php:
- 5.4
- 5.6

env:
global:
Expand All @@ -21,6 +21,7 @@ addons:
- realpath

before_install:
- make
- sh -c "if [ '$TEST_DAV' = '1' ]; then bash tests/travis/before_install.sh $DB; fi"

install:
Expand All @@ -29,24 +30,20 @@ install:


script:
- sh -c "if [ '$TC' = 'syntax' ]; then composer install && lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .; fi"
- sh -c "if [ '$TC' = 'syntax' ]; then make test-php-lint ; fi"
- sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
- sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"

- sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/script.sh; fi"

matrix:
include:
- php: 5.4
- php: 5.6
env: DB=pgsql;TC=litmus-v1
- php: 5.4
- php: 5.6
env: DB=sqlite;TC=carddav
- php: 5.4
- php: 5.6
env: DB=sqlite;TC=caldav
- php: 5.4
env: DB=sqlite;TC=syntax;TEST_DAV=0
- php: 5.5
env: DB=sqlite;TC=syntax;TEST_DAV=0
- php: 5.6
env: DB=sqlite;TC=syntax;TEST_DAV=0
- php: 7.0
Expand Down
1 change: 0 additions & 1 deletion 3rdparty
Submodule 3rdparty deleted from 4eb81c
35 changes: 16 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
timestampedNode('SLAVE') {
stage 'Checkout'
checkout scm
sh '''git submodule update --init'''
sh '''composer install'''

stage 'JavaScript Testing'
executeAndReport('tests/autotest-results-js.xml') {
sh '''./autotest-js.sh'''
sh '''make test-js'''
}

stage 'PHPUnit'
Expand All @@ -20,31 +20,31 @@ timestampedNode('SLAVE') {
export NOCOVERAGE=1
unset USEDOCKER
phpenv local 7.0
./autotest.sh sqlite
make test-php TEST_DATABASE=sqlite
'''
}
executeAndReport('tests/autotest-results-mysql.xml') {
sh '''
export NOCOVERAGE=1
unset USEDOCKER
phpenv local 5.4
./autotest.sh mysql
phpenv local 7.0
make test-php TEST_DATABASE=mysql
'''
}
executeAndReport('tests/autotest-results-pgsql.xml') {
sh '''
export NOCOVERAGE=1
unset USEDOCKER
phpenv local 5.6
./autotest.sh pgsql
make test-php TEST_DATABASE=pgsql
'''
}
executeAndReport('tests/autotest-results-oci.xml') {
sh '''
export NOCOVERAGE=1
unset USEDOCKER
phpenv local 5.5
./autotest.sh oci
phpenv local 5.6
make test-php TEST_DATABASE=oci
'''
}

Expand All @@ -53,28 +53,28 @@ timestampedNode('SLAVE') {
sh '''phpenv local 7.0
export NOCOVERAGE=1
unset USEDOCKER
./autotest-external.sh sqlite webdav-ownCloud
make test-external TEST_EXTERNAL_ENV=webdav-ownCloud
'''
}
executeAndReport('tests/autotest-external-results-sqlite-smb-silvershell.xml') {
sh '''phpenv local 7.0
export NOCOVERAGE=1
unset USEDOCKER
./autotest-external.sh sqlite smb-silvershell
make test-external TEST_EXTERNAL_ENV=smb-silvershell
'''
}
executeAndReport('tests/autotest-external-results-sqlite-swift-ceph.xml') {
sh '''phpenv local 7.0
export NOCOVERAGE=1
unset USEDOCKER
./autotest-external.sh sqlite swift-ceph
make test-external TEST_EXTERNAL_ENV=swift-ceph
'''
}
executeAndReport('tests/autotest-external-results-sqlite-smb-windows.xml') {
sh '''phpenv local 7.0
export NOCOVERAGE=1
unset USEDOCKER
./autotest-external.sh sqlite smb-windows
make test-external TEST_EXTERNAL_ENV=smb-windows
'''
}

Expand All @@ -89,8 +89,8 @@ timestampedNode('SLAVE') {
export PRIMARY_STORAGE_CONFIG="swift"
unset USEDOCKER

rm tests/autotest-results-*.xml
./autotest.sh mysql
make clean-test-results
make test-php TEST_DATABASE=mysql
'''
}

Expand All @@ -99,11 +99,8 @@ timestampedNode('SLAVE') {
sh '''phpenv local 7.0
rm -rf config/config.php
./occ maintenance:install --admin-pass=admin
rm -rf build/integration/output
rm -rf build/integration/vendor
rm -rf build/integration/composer.lock
cd build/integration
./run.sh
make clean-test-integration
make test-integration
'''
}
}
Expand Down
145 changes: 145 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
NODE_PREFIX=build
NPM=npm
KARMA="$(NODE_PREFIX)/node_modules/.bin/karma"
BOWER="$(NODE_PREFIX)/node_modules/.bin/bower"
JSDOC="$(NODE_PREFIX)/node_modules/.bin/jsdoc"
PHPUNIT="$(PWD)/lib/composer/phpunit/phpunit/phpunit"
COMPOSER_BIN=build/composer.phar

TEST_DATABASE=sqlite
TEST_EXTERNAL_ENV=smb-silvershell

# internal aliases
composer_deps=lib/composer
composer_dev_deps=lib/composer/phpunit
nodejs_deps=build/node_modules
core_vendor=core/vendor

#
# Catch-all rules
#
.PHONY: all
all: $(composer_deps) $(core_vendor)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeepDiver1975 weird, I thought we changed this to composer_dev_deps ?


.PHONY: clean
clean: clean-composer-deps clean-nodejs-deps clean-js-deps clean-test-results

#
# Basic required tools
#
$(COMPOSER_BIN):
cd build && curl -sS https://getcomposer.org/installer | php

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PVince81 composer.phar is now in build sub folder


#
# ownCloud core PHP dependencies
#
$(composer_deps): $(COMPOSER_BIN)
php $(COMPOSER_BIN) install --no-dev

$(composer_dev_deps): $(COMPOSER_BIN)
php $(COMPOSER_BIN) install --dev

.PHONY: install-composer-release-deps
install-composer-release-deps: $(composer_deps)

.PHONY: install-composer-dev-deps
install-composer-dev-deps: $(composer_dev_deps)

.PHONY: install-composer-deps
install-composer-deps: install-composer-dev-deps

.PHONY: update-composer
update-composer: $(COMPOSER_BIN)
rm -f composer.lock
php $(COMPOSER_BIN) install --prefer-dist

.PHONY: clean-composer-deps
clean-composer-deps:
rm -f $(COMPOSER_BIN)
rm -Rf lib/composer

#
# Node JS dependencies for tools
#
$(nodejs_deps):
$(NPM) install --prefix $(NODE_PREFIX)

.PHONY: install-nodejs-deps
install-nodejs-deps: $(nodejs_deps)

.PHONY: clean-nodejs-deps
clean-nodejs-deps:
rm -Rf $(nodejs_deps)

#
# ownCloud core JS dependencies
$(core_vendor): $(nodejs_deps)
$(BOWER) install

.PHONY: install-js-deps
install-js-deps: $(nodejs_deps)

.PHONY: update-js-deps
update-js-deps: $(nodejs_deps)
$(BOWER) update

.PHONY: clean-js-deps
clean-js-deps:
rm -Rf $(core_vendor)

#
# Tests
#
.PHONY: test-php
test-php: $(composer_dev_deps)
PHPUNIT=$(PHPUNIT) build/autotest.sh $(TEST_DATABASE)

.PHONY: test-external
test-external: $(composer_dev_deps)
PHPUNIT=$(PHPUNIT) build/autotest-external.sh $(TEST_DATABASE) $(TEST_EXTERNAL_ENV)

.PHONY: test-js
test-js: $(nodejs_deps) $(js_deps) $(core_vendor)
NODE_PATH='$(NODE_PREFIX)/node_modules' $(KARMA) start tests/karma.config.js --single-run

.PHONY: test-integration
test-integration: $(composer_dev_deps)
$(MAKE) -C build/integration

.PHONY: test-php-lint
test-php-lint: $(composer_dev_deps)
$(composer_deps)/bin/parallel-lint --exclude lib/composer --exclude build .

.PHONY: test
test: test-php-lint test-php test-js test-integration

.PHONY: clean-test-integration
clean-test-integration:
$(MAKE) -C build/integration clean

.PHONY: clean-test-results
clean-test-results:
rm -Rf tests/autotest-*results*.xml
$(MAKE) -C build/integration clean-test-results

#
# Documentation
#
.PHONY: docs-js
docs-js: $(nodejs_deps)
$(JSDOC) -d build/jsdocs core/js/*.js core/js/**/*.js apps/*/js/*.js

.PHONY: docs
docs: docs-js

.PHONY: clean-docs
clean-docs:
rm -Rf build/jsdocs

#
# Miscellaneous tools
#
.PHONY: update-php-license-header
update-php-license-header:
php build/license.php

4 changes: 2 additions & 2 deletions apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ public function testGetDenormalizedData($expected, $key, $calData) {

public function providesCalDataForGetDenormalizedData() {
return [
'first occurrence before unix epoch starts' => [0, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 3.5.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nDTSTART;VALUE=DATE:16040222\r\nDTEND;VALUE=DATE:16040223\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"],
'no first occurrence because yearly' => [null, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 3.5.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"],
'first occurrence before unix epoch starts' => [0, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 3.5.2//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nDTSTART;VALUE=DATE:16040222\r\nDTEND;VALUE=DATE:16040223\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"],
'no first occurrence because yearly' => [null, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 3.5.2//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"],
'CLASS:PRIVATE' => [CalDavBackend::CLASSIFICATION_PRIVATE, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:PRIVATE\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"],
'CLASS:PUBLIC' => [CalDavBackend::CLASSIFICATION_PUBLIC, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:PUBLIC\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"],
'CLASS:CONFIDENTIAL' => [CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:CONFIDENTIAL\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"],
Expand Down
Loading