cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lorinb...@apache.org
Subject [1/2] spec commit: [CB-2913] initial commit of toetag script toetag parses unit tests, adding a spec id grep commands and regex in place
Date Fri, 05 Apr 2013 22:56:03 GMT
Updated Branches:
  refs/heads/toetagger [created] b0e1455e6


[CB-2913] initial commit of toetag script
toetag parses unit tests, adding a spec id
grep commands and regex in place


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/5e1763ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/5e1763ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/5e1763ea

Branch: refs/heads/toetagger
Commit: 5e1763ea6979d8512477260f40f063ac76f588fb
Parents: 93f50ae
Author: lorinbeer <lorin@adobe.com>
Authored: Fri Apr 5 14:19:08 2013 -0700
Committer: Md Monirul Islam <lorin@adobe.com>
Committed: Fri Apr 5 14:28:03 2013 -0700

----------------------------------------------------------------------
 bin/toetag |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 73 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/5e1763ea/bin/toetag
----------------------------------------------------------------------
diff --git a/bin/toetag b/bin/toetag
new file mode 100755
index 0000000..678f278
--- /dev/null
+++ b/bin/toetag
@@ -0,0 +1,73 @@
+##
+ #
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements.  See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership.  The ASF licenses this file
+ # to you 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.
+ #
+##
+
+
+##
+ #
+ #
+ #
+##
+
+defaultpath="../autotest/tests/"
+
+##
+ # regex
+##
+# regex for id'ing a spec
+specreg="it(\".*"
+# regex for id'ing a tagged spec
+tagged="SPEC-1234"
+
+suitename="SUITE"
+
+#greptests=$(grep  --include=*.js $specreg ../autotest/tests/device.tests.js)
+
+#$grepuntagged=$(grep -o $tagged $greptests)
+
+#totag=$(grep  --include=*.js $specreg ../autotest/tests/device.tests.js | grep -v $tagged)
#|  sed -i "" s/it(\".*/it(\"SUITE-SPEC.*/
+#echo $totag | sed s/it\(\"/it\(\"SUITE-SPEC\ / ../autotest/tests/device.tests.js
+
+
+# read all entries in default_path
+read -a targets <<< $(ls $defaultpath)
+
+toetagtargets() {
+    for file in ${targets[@]}
+    do
+        echo toetagging $file
+        suitename $file
+        echo Suite Name: $suitename
+        #found=$(grep -c $specreg $defaultpath$file)
+        #echo found $found specs to toetag
+        #totag=$(
+    done
+}
+
+suitename() {
+    temp=$IFS
+    IFS='.'
+    read -ra suitename <<< "$1"
+    IFS=$temp
+}
+
+
+toetagtargets
+#echo ${#targets[*]}


Mime
View raw message