RES1="$(url2sr http://download.tizen.org/snapshots/tizen/common/tizen-common_20160909.2/ 2>&1)"
[ "$RES1" = "tizen-common_20160909.2" ]
}
+
+@test "url2profile: snap_url (tizen common)" {
+ RES1="$(url2profile http://download.tizen.org/snapshots/tizen/common/tizen-common_20160909.2/ 2>&1)"
+ [ "$RES1" = "common" ]
+}
+
+@test "url2profile: snap_url (tizen common 3.0)" {
+ RES1="$(url2profile http://download.tizen.org/snapshots/tizen/3.0-common/tizen-3.0-common_20160909.2/ 2>&1)"
+ [ "$RES1" = "3.0-common" ]
+}
+
+@test "url2profile: pre_url (tizen common)" {
+ RES1="$(url2profile http://download.tizen.org/prerelease/tizen/common/tizen-common_20160613.3/tizen-common_20160613.3.20160614.075200/ 2>&1)"
+ [ "$RES1" = "common" ]
+}
+
+@test "url2profile: pre_url (tizen common 3.0)" {
+ RES1="$(url2profile http://download.tizen.org/prerelease/tizen/3.0-common/tizen-common_20160613.3/tizen-3.0-common_20160613.3.20160614.075200/ 2>&1)"
+ [ "$RES1" = "3.0-common" ]
+}
+
+@test "url2profile: snap_url (tizen mobile 3.0)" {
+ RES1="$(url2profile http://download.tizen.org/snapshots/tizen/3.0-mobile/tizen-3.0-mobile_20161116.1/ 2>&1)"
+ [ "$RES1" = "3.0-mobile" ]
+}
+
+@test "url2profile: pre_url (tizen mobile 3.0)" {
+ RES1="$(url2profile http://download.tizen.org/prerelease/tizen/3.0-mobile/tizen-3.0-mobile_20161116.1/tizen-3.0-mobile_20161116.1.20161116.094536/ 2>&1)"
+ [ "$RES1" = "3.0-mobile" ]
+}
head -n 1 "${PROJECT_FILE}" | tr -d '\n'
}
+url2profile() {
+ URL="$1"
+ test -n "$URL" || die "Missing argument: url"
+ RET="${URL%%/tizen-*/}"
+ RET="${RET##*/}"
+ echo "$RET"
+}
+
update_db() {
SR="$1"
TAG="$2"