diff options
| -rw-r--r-- | meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 510 | ||||
| -rw-r--r-- | meta/recipes-extended/lsb/lsbtest/packages_list | 50 | ||||
| -rw-r--r-- | meta/recipes-extended/lsb/lsbtest/session | 194 | ||||
| -rw-r--r-- | meta/recipes-extended/lsb/lsbtest_1.0.bb | 37 |
4 files changed, 791 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh new file mode 100644 index 0000000000..f14f485285 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | |||
| @@ -0,0 +1,510 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # Copyright (C) 2012 Wind River Systems, Inc. | ||
| 4 | # | ||
| 5 | # This program is free software; you can redistribute it and/or modify | ||
| 6 | # it under the terms of the GNU General Public License version 2 as | ||
| 7 | # published by the Free Software Foundation. | ||
| 8 | # | ||
| 9 | # This program is distributed in the hope that it will be useful, | ||
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 12 | # See the GNU General Public License for more details. | ||
| 13 | # | ||
| 14 | # You should have received a copy of the GNU General Public License | ||
| 15 | # along with this program; if not, write to the Free Software | ||
| 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 17 | |||
| 18 | |||
| 19 | WORK_DIR="/opt/lsb-test" | ||
| 20 | |||
| 21 | if [ `id -u` -ne 0 ] | ||
| 22 | then | ||
| 23 | cat << EOF | ||
| 24 | In order to install and run LSB testsuite, you need administrator privileges. | ||
| 25 | You are currently running this script as an unprivileged user. | ||
| 26 | |||
| 27 | EOF | ||
| 28 | exit 1 | ||
| 29 | fi | ||
| 30 | |||
| 31 | ARCH=`uname -m` | ||
| 32 | if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] | ||
| 33 | then | ||
| 34 | echo "Error: Unsupported architecture" | ||
| 35 | exit 1 | ||
| 36 | fi | ||
| 37 | |||
| 38 | which rpm | ||
| 39 | if [ $? -ne 0 ] | ||
| 40 | then | ||
| 41 | echo "No rpm command found" | ||
| 42 | exit 1 | ||
| 43 | fi | ||
| 44 | |||
| 45 | RET=0 | ||
| 46 | |||
| 47 | cd ${WORK_DIR} || exit 1 | ||
| 48 | # Step 1: Download the LSB Packages | ||
| 49 | echo "" | ||
| 50 | echo "Download LSB packages..." | ||
| 51 | echo "" | ||
| 52 | |||
| 53 | if [ ! -e ./packages_list ] | ||
| 54 | then | ||
| 55 | echo "Error: Could not find packages list" >&2 | ||
| 56 | exit 1 | ||
| 57 | fi | ||
| 58 | |||
| 59 | . ./packages_list | ||
| 60 | |||
| 61 | PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb" | ||
| 62 | |||
| 63 | BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary" | ||
| 64 | RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime" | ||
| 65 | RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime" | ||
| 66 | APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}" | ||
| 67 | APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests" | ||
| 68 | SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests" | ||
| 69 | |||
| 70 | if [ ! -d ${PACKAGES_DIR} ] | ||
| 71 | then | ||
| 72 | mkdir -p ${PACKAGES_DIR} | ||
| 73 | fi | ||
| 74 | |||
| 75 | if [ ! -d ${BASE_PACKAGES_DIR} ] | ||
| 76 | then | ||
| 77 | mkdir -p ${BASE_PACKAGES_DIR} | ||
| 78 | fi | ||
| 79 | |||
| 80 | if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ] | ||
| 81 | then | ||
| 82 | mkdir -p ${RUNTIME_BASE_PACKAGES_DIR} | ||
| 83 | fi | ||
| 84 | |||
| 85 | if [ ! -d ${RUNTIME_PACKAGES_DIR} ] | ||
| 86 | then | ||
| 87 | mkdir -p ${RUNTIME_PACKAGES_DIR} | ||
| 88 | fi | ||
| 89 | |||
| 90 | if [ ! -d ${APP_PACKAGES_DIR} ] | ||
| 91 | then | ||
| 92 | mkdir -p ${APP_PACKAGES_DIR} | ||
| 93 | fi | ||
| 94 | |||
| 95 | if [ ! -d ${APP_TESTFILES_DIR} ] | ||
| 96 | then | ||
| 97 | mkdir -p ${APP_TESTFILES_DIR} | ||
| 98 | fi | ||
| 99 | |||
| 100 | # Official download server list. You can replace them with your own server. | ||
| 101 | SERVER_IPADDR="140.211.169.23" | ||
| 102 | SERVER_NAME="ftp.linuxfoundation.org" | ||
| 103 | |||
| 104 | if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then | ||
| 105 | echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts | ||
| 106 | fi | ||
| 107 | |||
| 108 | #ping -c 5 ${SERVER_NAME} | ||
| 109 | #if [ $? -ne 0 ] | ||
| 110 | #then | ||
| 111 | # echo "The server: ${SERVER_NAME} is unreachable" | ||
| 112 | # exit 1 | ||
| 113 | #fi | ||
| 114 | |||
| 115 | SERVER1="\ | ||
| 116 | http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary" | ||
| 117 | SERVER2="\ | ||
| 118 | http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime" | ||
| 119 | SERVER3="\ | ||
| 120 | http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime" | ||
| 121 | SERVER4="\ | ||
| 122 | http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}" | ||
| 123 | SERVER5="\ | ||
| 124 | http://${SERVER_NAME}/pub/lsb/app-battery/tests" | ||
| 125 | |||
| 126 | # We using "curl" as a download tool, "wget" is an alternative. | ||
| 127 | CURL=`which curl` | ||
| 128 | WGET=`which wget` | ||
| 129 | if [ ! -z ${CURL} ] | ||
| 130 | then | ||
| 131 | DOWNLOAD_CMD="${CURL} -R -L --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o" | ||
| 132 | elif [ ! -z ${WGET} ] | ||
| 133 | then | ||
| 134 | DOWNLOAD_CMD="${WGET} -c -t 5 -O" | ||
| 135 | else | ||
| 136 | echo "Can not find a download tool, please install curl or wget." | ||
| 137 | exit 1 | ||
| 138 | fi | ||
| 139 | |||
| 140 | cd ${BASE_PACKAGES_DIR} | ||
| 141 | for pkg in ${BASE_PACKAGES_LIST}; do | ||
| 142 | if [ ! -f ${pkg} ] | ||
| 143 | then | ||
| 144 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1 | ||
| 145 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} | ||
| 146 | if [ $? -eq 0 ] | ||
| 147 | then | ||
| 148 | mv -f ${pkg}".#part" ${pkg} | ||
| 149 | echo "Download ${pkg} successfully." | ||
| 150 | else | ||
| 151 | echo "Download ${pkg} failed." | ||
| 152 | RET=1 | ||
| 153 | fi | ||
| 154 | fi | ||
| 155 | done | ||
| 156 | |||
| 157 | cd ${RUNTIME_BASE_PACKAGES_DIR} | ||
| 158 | for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do | ||
| 159 | if [ ! -f ${pkg} ] | ||
| 160 | then | ||
| 161 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1 | ||
| 162 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} | ||
| 163 | if [ $? -eq 0 ] | ||
| 164 | then | ||
| 165 | mv -f ${pkg}".#part" ${pkg} | ||
| 166 | echo "Download ${pkg} successfully." | ||
| 167 | else | ||
| 168 | echo "Download ${pkg} failed." | ||
| 169 | RET=1 | ||
| 170 | fi | ||
| 171 | fi | ||
| 172 | done | ||
| 173 | |||
| 174 | cd ${RUNTIME_PACKAGES_DIR} | ||
| 175 | for pkg in ${RUNTIME_PACKAGES_LIST}; do | ||
| 176 | if [ ! -f ${pkg} ] | ||
| 177 | then | ||
| 178 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1 | ||
| 179 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} | ||
| 180 | if [ $? -eq 0 ] | ||
| 181 | then | ||
| 182 | mv -f ${pkg}".#part" ${pkg} | ||
| 183 | echo "Download ${pkg} successfully." | ||
| 184 | else | ||
| 185 | echo "Download ${pkg} failed." | ||
| 186 | RET=1 | ||
| 187 | fi | ||
| 188 | fi | ||
| 189 | done | ||
| 190 | |||
| 191 | cd ${APP_PACKAGES_DIR} | ||
| 192 | for pkg in ${APP_PACKAGES_LIST}; do | ||
| 193 | if [ ! -f ${pkg} ] | ||
| 194 | then | ||
| 195 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1 | ||
| 196 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} | ||
| 197 | if [ $? -eq 0 ] | ||
| 198 | then | ||
| 199 | mv -f ${pkg}".#part" ${pkg} | ||
| 200 | echo "Download ${pkg} successfully." | ||
| 201 | else | ||
| 202 | echo "Download ${pkg} failed." | ||
| 203 | RET=1 | ||
| 204 | fi | ||
| 205 | fi | ||
| 206 | done | ||
| 207 | |||
| 208 | cd ${APP_TESTFILES_DIR} | ||
| 209 | for pkg in ${APP_TESTFILES_LIST}; do | ||
| 210 | if [ ! -f ${pkg} ] | ||
| 211 | then | ||
| 212 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1 | ||
| 213 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} | ||
| 214 | if [ $? -eq 0 ] | ||
| 215 | then | ||
| 216 | mv -f ${pkg}".#part" ${pkg} | ||
| 217 | echo "Download ${pkg} successfully." | ||
| 218 | else | ||
| 219 | echo "Download ${pkg} failed." | ||
| 220 | RET=1 | ||
| 221 | fi | ||
| 222 | fi | ||
| 223 | done | ||
| 224 | |||
| 225 | if [ ${RET} -ne 0 ] | ||
| 226 | then | ||
| 227 | echo "Download some packages failed. Please download them again." | ||
| 228 | exit 1 | ||
| 229 | fi | ||
| 230 | |||
| 231 | # Step 2: Install the LSB Packages | ||
| 232 | echo "" | ||
| 233 | echo "Install LSB packages..." | ||
| 234 | echo "" | ||
| 235 | |||
| 236 | # Kill lighttpd | ||
| 237 | ps aux | grep "lighttpd" | grep -v -q "grep" | ||
| 238 | if [ $? -eq 0 ] | ||
| 239 | then | ||
| 240 | killall lighttpd >/dev/null 2>&1 | ||
| 241 | fi | ||
| 242 | |||
| 243 | # Start avahi-daemon | ||
| 244 | ps aux | grep "avahi-daemon" | grep -v -q "grep" | ||
| 245 | if [ $? -ne 0 ] | ||
| 246 | then | ||
| 247 | /etc/init.d/avahi-daemon start >/dev/null 2>&1 | ||
| 248 | fi | ||
| 249 | |||
| 250 | LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl" | ||
| 251 | LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl" | ||
| 252 | |||
| 253 | PLATFORM_FILE="/etc/rpm/platform" | ||
| 254 | |||
| 255 | RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i" | ||
| 256 | RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i" | ||
| 257 | |||
| 258 | # If the lsb has been started, stop it first. | ||
| 259 | if [ -x ${LSB_STOP_CMD} ] | ||
| 260 | then | ||
| 261 | ${LSB_STOP_CMD} | ||
| 262 | fi | ||
| 263 | |||
| 264 | if [ ! -d /etc/rpm ] | ||
| 265 | then | ||
| 266 | mkdir -p /etc/rpm | ||
| 267 | fi | ||
| 268 | |||
| 269 | if [ ! -f ${PLATFORM_FILE} ] | ||
| 270 | then | ||
| 271 | touch ${PLATFORM_FILE} | ||
| 272 | fi | ||
| 273 | |||
| 274 | if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then | ||
| 275 | if [ ${ARCH} == i686 ];then | ||
| 276 | echo "i486-suse" >> ${PLATFORM_FILE} | ||
| 277 | echo "i486-noarch" >> ${PLATFORM_FILE} | ||
| 278 | echo "i486-pc" >> ${PLATFORM_FILE} | ||
| 279 | echo "noarch-suse" >> ${PLATFORM_FILE} | ||
| 280 | else | ||
| 281 | echo "${ARCH}-suse" >> ${PLATFORM_FILE} | ||
| 282 | echo "${ARCH}-noarch" >> ${PLATFORM_FILE} | ||
| 283 | echo "${ARCH}-pc" >> ${PLATFORM_FILE} | ||
| 284 | echo "noarch-suse" >> ${PLATFORM_FILE} | ||
| 285 | fi | ||
| 286 | fi | ||
| 287 | |||
| 288 | if [ -d ${BASE_PACKAGES_DIR} ] | ||
| 289 | then | ||
| 290 | cd ${BASE_PACKAGES_DIR} | ||
| 291 | for pkg in ${BASE_PACKAGES_LIST} | ||
| 292 | do | ||
| 293 | rpm --quiet -q ${pkg%\.*} | ||
| 294 | if [ $? -ne 0 ]; then | ||
| 295 | $RPM_INSTALL_CMD ${pkg} | ||
| 296 | fi | ||
| 297 | done | ||
| 298 | fi | ||
| 299 | |||
| 300 | if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ] | ||
| 301 | then | ||
| 302 | cd ${RUNTIME_BASE_PACKAGES_DIR} | ||
| 303 | for pkg in ${RUNTIME_BASE_PACKAGES_LIST} | ||
| 304 | do | ||
| 305 | rpm --quiet -q ${pkg%\.*} | ||
| 306 | if [ $? -ne 0 ]; then | ||
| 307 | $RPM_INSTALL_CMD ${pkg} | ||
| 308 | fi | ||
| 309 | done | ||
| 310 | fi | ||
| 311 | |||
| 312 | if [ -d ${RUNTIME_PACKAGES_DIR} ] | ||
| 313 | then | ||
| 314 | cd ${RUNTIME_PACKAGES_DIR} | ||
| 315 | for pkg in ${RUNTIME_PACKAGES_LIST} | ||
| 316 | do | ||
| 317 | rpm --quiet -q ${pkg%\.*} | ||
| 318 | if [ $? -ne 0 ]; then | ||
| 319 | $RPM_INSTALL_CMD ${pkg} | ||
| 320 | fi | ||
| 321 | done | ||
| 322 | fi | ||
| 323 | |||
| 324 | if [ -d ${APP_PACKAGES_DIR} ] | ||
| 325 | then | ||
| 326 | cd ${APP_PACKAGES_DIR} | ||
| 327 | for pkg in ${APP_PACKAGES_LIST} | ||
| 328 | do | ||
| 329 | echo "${pkg}" | grep -q "apache\|xpdf" | ||
| 330 | if [ $? -eq 0 ] | ||
| 331 | then | ||
| 332 | rpm --quiet -q ${pkg%\.*} | ||
| 333 | if [ $? -ne 0 ]; then | ||
| 334 | $RPM_INSTALL_CMD_NOSCRIPTS ${pkg} | ||
| 335 | fi | ||
| 336 | else | ||
| 337 | rpm --quiet -q ${pkg%\.*} | ||
| 338 | if [ $? -ne 0 ]; then | ||
| 339 | $RPM_INSTALL_CMD ${pkg} | ||
| 340 | fi | ||
| 341 | fi | ||
| 342 | done | ||
| 343 | fi | ||
| 344 | |||
| 345 | if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ] | ||
| 346 | then | ||
| 347 | mkdir -p ${SNAPSHOTS_TESTFILES_DIR} | ||
| 348 | fi | ||
| 349 | |||
| 350 | if [ -d ${APP_TESTFILES_DIR} ] | ||
| 351 | then | ||
| 352 | cd ${APP_TESTFILES_DIR} | ||
| 353 | for pkg in ${APP_TESTFILES_LIST} | ||
| 354 | do | ||
| 355 | cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR} | ||
| 356 | done | ||
| 357 | fi | ||
| 358 | |||
| 359 | cd ${WORK_DIR} | ||
| 360 | |||
| 361 | # Step 3: Set environment | ||
| 362 | echo "" | ||
| 363 | echo "Set environment..." | ||
| 364 | echo "" | ||
| 365 | |||
| 366 | check () | ||
| 367 | { | ||
| 368 | if [ $? -eq 0 ] | ||
| 369 | then | ||
| 370 | echo "PASS" | ||
| 371 | else | ||
| 372 | echo "FAIL" | ||
| 373 | exit 1 | ||
| 374 | fi | ||
| 375 | } | ||
| 376 | |||
| 377 | echo "" | ||
| 378 | echo "---------------------------------" | ||
| 379 | echo "Create the Dirnames on target" | ||
| 380 | |||
| 381 | if [ ! -d /etc/rpm/sysinfo ] | ||
| 382 | then | ||
| 383 | mkdir -p /etc/rpm/sysinfo | ||
| 384 | fi | ||
| 385 | |||
| 386 | cat > /etc/rpm/sysinfo/Dirnames << EOF | ||
| 387 | /etc/opt/lsb | ||
| 388 | /home/tet/LSB.tools | ||
| 389 | /opt/lsb-tet3-lite/lib/ksh | ||
| 390 | /opt/lsb-tet3-lite/lib/perl | ||
| 391 | /opt/lsb-tet3-lite/lib/posix_sh | ||
| 392 | /opt/lsb-tet3-lite/lib/tet3 | ||
| 393 | /opt/lsb-tet3-lite/lib/xpg3sh | ||
| 394 | /opt/lsb/appbat/lib/python2.4/site-packages/qm | ||
| 395 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/external | ||
| 396 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate | ||
| 397 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/test | ||
| 398 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes | ||
| 399 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web | ||
| 400 | /opt/lsb/test/doc | ||
| 401 | /opt/lsb/test/lib | ||
| 402 | /opt/lsb/test/qm/diagnostics | ||
| 403 | /opt/lsb/test/qm/doc | ||
| 404 | /opt/lsb/test/qm/doc/test/html | ||
| 405 | /opt/lsb/test/qm/doc/test/print | ||
| 406 | /opt/lsb/test/qm/dtml | ||
| 407 | /opt/lsb/test/qm/dtml/test | ||
| 408 | /opt/lsb/test/qm/messages/test | ||
| 409 | /opt/lsb/test/qm/tutorial/test/tdb | ||
| 410 | /opt/lsb/test/qm/tutorial/test/tdb/QMTest | ||
| 411 | /opt/lsb/test/qm/web | ||
| 412 | /opt/lsb/test/qm/web/images | ||
| 413 | /opt/lsb/test/qm/web/stylesheets | ||
| 414 | /opt/lsb/test/qm/xml | ||
| 415 | /opt/lsb/test/share | ||
| 416 | /usr/share/doc/lsb-runtime-test | ||
| 417 | /var/opt/lsb | ||
| 418 | /opt/lsb/test/desktop | ||
| 419 | /opt/lsb/test/desktop/fontconfig | ||
| 420 | /opt/lsb/test/desktop/freetype | ||
| 421 | /opt/lsb/test/desktop/gtkvts | ||
| 422 | /opt/lsb/test/desktop/libpng | ||
| 423 | /opt/lsb/test/desktop/qt3 | ||
| 424 | /opt/lsb/test/desktop/xft | ||
| 425 | /opt/lsb/test/desktop/xml | ||
| 426 | /opt/lsb/test/desktop/xrender | ||
| 427 | |||
| 428 | |||
| 429 | EOF | ||
| 430 | |||
| 431 | if [ -f /etc/rpm/sysinfo/Dirnames ] | ||
| 432 | then | ||
| 433 | echo "Success to creat Dirnames file" | ||
| 434 | else | ||
| 435 | echo "Fail to creat Dirnames file" | ||
| 436 | fi | ||
| 437 | |||
| 438 | echo "" | ||
| 439 | echo "---------------------------------" | ||
| 440 | echo "Update cache" | ||
| 441 | ldconfig | ||
| 442 | check; | ||
| 443 | |||
| 444 | # Check loop device | ||
| 445 | if [ ! -b /dev/loop0 ] | ||
| 446 | then | ||
| 447 | insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko | ||
| 448 | if [ $? != 0 ];then | ||
| 449 | echo "Insmod loop.ko failed." | ||
| 450 | fi | ||
| 451 | fi | ||
| 452 | |||
| 453 | # Resolve localhost | ||
| 454 | LOCALHOST=`hostname` | ||
| 455 | if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then | ||
| 456 | echo "127.0.0.1 $LOCALHOST" >> /etc/hosts | ||
| 457 | fi | ||
| 458 | |||
| 459 | # Workaround to add part of locales for LSB test | ||
| 460 | localedef -i de_DE -f ISO-8859-1 de_DE | ||
| 461 | localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15 | ||
| 462 | localedef -i de_DE -f UTF-8 de_DE.UTF-8 | ||
| 463 | localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro | ||
| 464 | localedef -i en_HK -f ISO-8859-1 en_HK | ||
| 465 | localedef -i en_PH -f ISO-8859-1 en_PH | ||
| 466 | localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 | ||
| 467 | localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1 | ||
| 468 | localedef -i en_US -f ISO-8859-1 en_US | ||
| 469 | localedef -i en_US -f UTF-8 en_US.UTF-8 | ||
| 470 | localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1 | ||
| 471 | localedef -i es_MX -f ISO-8859-1 es_MX | ||
| 472 | localedef -i fr_FR -f ISO-8859-1 fr_FR | ||
| 473 | localedef -i it_IT -f ISO-8859-1 it_IT | ||
| 474 | localedef -i ja_JP -f EUC-JP ja_JP.eucjp | ||
| 475 | localedef -i se_NO -f UTF-8 se_NO.UTF-8 | ||
| 476 | localedef -i ta_IN -f UTF-8 ta_IN | ||
| 477 | |||
| 478 | echo "" | ||
| 479 | echo "Installation done!" | ||
| 480 | echo "" | ||
| 481 | |||
| 482 | # Step 4: Start LSB test | ||
| 483 | if [ -x ${LSB_START_CMD} ] | ||
| 484 | then | ||
| 485 | ${LSB_START_CMD} | ||
| 486 | fi | ||
| 487 | |||
| 488 | echo "---------------------------------" | ||
| 489 | echo "Run all the certification version of LSB Tests" | ||
| 490 | echo "---------------------------------" | ||
| 491 | |||
| 492 | LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl" | ||
| 493 | SESSION="${WORK_DIR}/session" | ||
| 494 | if [ ! -e ${SESSION} ] | ||
| 495 | then | ||
| 496 | echo "Error: Could not find session file." | ||
| 497 | echo "You must run LSB test from webbrower." | ||
| 498 | exit 1 | ||
| 499 | fi | ||
| 500 | |||
| 501 | if [ -x ${LSB_DIST_CHECKER} ] | ||
| 502 | then | ||
| 503 | ${LSB_DIST_CHECKER} -v2 -f ${SESSION} | ||
| 504 | check | ||
| 505 | fi | ||
| 506 | |||
| 507 | echo "" | ||
| 508 | echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/" | ||
| 509 | echo "" | ||
| 510 | |||
diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list new file mode 100644 index 0000000000..9285ed91e4 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/packages_list | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | LSB_RELEASE="released-4.1.0" | ||
| 2 | LSB_ARCH="lsbarch" | ||
| 3 | |||
| 4 | BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm" | ||
| 5 | |||
| 6 | RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-4.1.0.1-2.targetarch.rpm \ | ||
| 7 | lsb-tet3-lite-3.7-15.lsb4.targetarch.rpm \ | ||
| 8 | lsb-tet3-lite-devel-3.7-15.lsb4.targetarch.rpm \ | ||
| 9 | lsb-xvfb-1.2.0-19.targetarch.rpm \ | ||
| 10 | " | ||
| 11 | |||
| 12 | RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.0-1.targetarch.rpm \ | ||
| 13 | lsb-libchk-4.1.0-1.targetarch.rpm \ | ||
| 14 | lsb-qm-2.2-8.lsb4.targetarch.rpm \ | ||
| 15 | lsb-task-dist-testkit-4.1.0-1.noarch.rpm \ | ||
| 16 | lsb-test-core-4.1.0-1.targetarch.rpm \ | ||
| 17 | lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \ | ||
| 18 | lsb-test-desktop-4.1.0-2.targetarch.rpm \ | ||
| 19 | lsb-test-desktop-t2c-4.1.0-1.targetarch.rpm \ | ||
| 20 | lsb-test-libstdcpp-4.1.0-13.lsb4.targetarch.rpm \ | ||
| 21 | lsb-test-olver-core-4.1.0-1.targetarch.rpm \ | ||
| 22 | lsb-test-perl-4.1.0-1.noarch.rpm \ | ||
| 23 | lsb-test-printing-4.1.0-1.targetarch.rpm \ | ||
| 24 | lsb-test-python-4.1.1-2.targetarch.rpm \ | ||
| 25 | lsb-test-qt3-azov-4.1.0-1.targetarch.rpm \ | ||
| 26 | lsb-test-qt4-azov-4.1.0-1.targetarch.rpm \ | ||
| 27 | lsb-test-xts5-5.1.5-38.lsb4.targetarch.rpm \ | ||
| 28 | lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \ | ||
| 29 | lsb-test-core-t2c-4.1.0-1.targetarch.rpm \ | ||
| 30 | lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \ | ||
| 31 | " | ||
| 32 | |||
| 33 | APP_PACKAGES_LIST="lsb-python-2.4.6-5.lsb4.targetarch.rpm \ | ||
| 34 | lsb-apache-2.2.14-3.lsb4.targetarch.rpm \ | ||
| 35 | lsb-tcl-8.5.7-6.lsb4.targetarch.rpm \ | ||
| 36 | lsb-expect-5.43.0-11.lsb4.targetarch.rpm \ | ||
| 37 | lsb-groff-1.20.1-5.lsb4.targetarch.rpm \ | ||
| 38 | lsb-raptor-1.4.19-3.lsb4.targetarch.rpm \ | ||
| 39 | lsb-xpdf-1.01-10.lsb4.targetarch.rpm \ | ||
| 40 | lsb-samba-3.4.3-5.lsb4.targetarch.rpm \ | ||
| 41 | lsb-rsync-3.0.6-3.lsb4.targetarch.rpm \ | ||
| 42 | " | ||
| 43 | |||
| 44 | APP_TESTFILES_LIST="expect-tests.tar \ | ||
| 45 | tcl-tests.tar \ | ||
| 46 | raptor-tests.tar \ | ||
| 47 | test1.pdf \ | ||
| 48 | test2.pdf \ | ||
| 49 | " | ||
| 50 | |||
diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session new file mode 100644 index 0000000000..85ca2efe92 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/session | |||
| @@ -0,0 +1,194 @@ | |||
| 1 | [GENERAL] | ||
| 2 | VERBOSE_LEVEL: 1 | ||
| 3 | ARCHITECTURE: targetarch | ||
| 4 | USE_INTERNET: 1 | ||
| 5 | STD_VERSION: LSB 4.1 | ||
| 6 | STD_PROFILE: no | ||
| 7 | [cmdchk] | ||
| 8 | RUN: 1 | ||
| 9 | VERSION: local|* | ||
| 10 | |||
| 11 | [libchk] | ||
| 12 | RUN: 1 | ||
| 13 | VERSION: local|* | ||
| 14 | |||
| 15 | [alsa-t2c] | ||
| 16 | RUN: 1 | ||
| 17 | VERSION: local|* | ||
| 18 | |||
| 19 | [alsa-t2c|local|*] | ||
| 20 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c | ||
| 21 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results | ||
| 22 | |||
| 23 | [core] | ||
| 24 | RUN: 1 | ||
| 25 | VERSION: local|* | ||
| 26 | |||
| 27 | [core|local|*] | ||
| 28 | AUTOREPLY_PROVIDES_BASH: n | ||
| 29 | AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets | ||
| 30 | AUTOREPLY_PERSON: Automated | ||
| 31 | AUTOREPLY_KERNEL_NAME: vmlinuz | ||
| 32 | AUTOREPLY_INSTALL_LSBPAM_CONF: y | ||
| 33 | AUTOREPLY_PROVIDES_C_SHELL: n | ||
| 34 | AUTOREPLY_ORGANISATION: N/A | ||
| 35 | AUTOREPLY_SET_PASS_MIN_DAYS: y | ||
| 36 | AUTOREPLY_PROVIDES_SYSV_INIT: | ||
| 37 | AUTOREPLY_ISNTALL_DEVS: y | ||
| 38 | AUTOREPLY_SUPPORTS_FILE_CMD: y | ||
| 39 | AUTOREPLY_TEST_SYSTEM: Distribution Checker | ||
| 40 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets | ||
| 41 | AUTOREPLY_SUPPORTS_NLS: n | ||
| 42 | AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n | ||
| 43 | AUTOREPLY_PATH_TO_RC.D: | ||
| 44 | AUTOREPLY_ALLOWS_MAKEDEV: n | ||
| 45 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results | ||
| 46 | |||
| 47 | [core-t2c] | ||
| 48 | RUN: 1 | ||
| 49 | VERSION: local|* | ||
| 50 | |||
| 51 | [core-t2c|local|*] | ||
| 52 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c | ||
| 53 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results | ||
| 54 | |||
| 55 | [cpp-t2c] | ||
| 56 | RUN: 1 | ||
| 57 | VERSION: local|* | ||
| 58 | |||
| 59 | [cpp-t2c|local|*] | ||
| 60 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c | ||
| 61 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results | ||
| 62 | |||
| 63 | [desktop] | ||
| 64 | RUN: 1 | ||
| 65 | VERSION: local|* | ||
| 66 | |||
| 67 | [desktop|local|*] | ||
| 68 | AUTOREPLY_DESKTOP_ENVIRONMENT: [default] | ||
| 69 | AUTOREPLY_PERSON: Automated | ||
| 70 | AUTOREPLY_X_CLIENT_HOSTNAME: | ||
| 71 | AUTOREPLY_TEST_SYSTEM: Distribution Checker | ||
| 72 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop | ||
| 73 | AUTOREPLY_X11_FONT_PATH: [default] | ||
| 74 | AUTOREPLY_SHOW_SUMMARY_REPORT: | ||
| 75 | AUTOREPLY_ORGANISATION: N/A | ||
| 76 | AUTOREPLY_XVFB_DISPLAY: [default] | ||
| 77 | |||
| 78 | [desktop-t2c] | ||
| 79 | RUN: 1 | ||
| 80 | VERSION: local|* | ||
| 81 | |||
| 82 | [desktop-t2c|local|*] | ||
| 83 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c | ||
| 84 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results | ||
| 85 | |||
| 86 | [libstdcpp] | ||
| 87 | RUN: 1 | ||
| 88 | VERSION: local|* | ||
| 89 | |||
| 90 | [libstdcpp|local|*] | ||
| 91 | AUTOREPLY_TEST_SYSTEM: Distribution Checker | ||
| 92 | AUTOREPLY_PERSON: Automated | ||
| 93 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0 | ||
| 94 | AUTOREPLY_ORGANISATION: N/A | ||
| 95 | AUTOREPLY_GNU_TRIPLET: | ||
| 96 | |||
| 97 | [olver] | ||
| 98 | RUN: 1 | ||
| 99 | VERSION: local|* | ||
| 100 | |||
| 101 | [olver|local|*] | ||
| 102 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core | ||
| 103 | AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core | ||
| 104 | |||
| 105 | [perl] | ||
| 106 | RUN: 1 | ||
| 107 | VERSION: local|* | ||
| 108 | |||
| 109 | [perl|local|*] | ||
| 110 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl | ||
| 111 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results | ||
| 112 | |||
| 113 | [printing] | ||
| 114 | RUN: 1 | ||
| 115 | VERSION: local|* | ||
| 116 | |||
| 117 | [printing|local|*] | ||
| 118 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing | ||
| 119 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results | ||
| 120 | |||
| 121 | [python] | ||
| 122 | RUN: 1 | ||
| 123 | VERSION: local|* | ||
| 124 | |||
| 125 | [python|local|*] | ||
| 126 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python | ||
| 127 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results | ||
| 128 | |||
| 129 | [qt3-azov] | ||
| 130 | RUN: 1 | ||
| 131 | VERSION: local|* | ||
| 132 | |||
| 133 | [qt3-azov|local|*] | ||
| 134 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov | ||
| 135 | AUTOREPLY_X11_FONT_PATH: [default] | ||
| 136 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results | ||
| 137 | |||
| 138 | [qt4-azov] | ||
| 139 | RUN: 1 | ||
| 140 | VERSION: local|* | ||
| 141 | |||
| 142 | [qt4-azov|local|*] | ||
| 143 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov | ||
| 144 | AUTOREPLY_X11_FONT_PATH: [default] | ||
| 145 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results | ||
| 146 | |||
| 147 | [xml2-azov] | ||
| 148 | RUN: 1 | ||
| 149 | VERSION: local|* | ||
| 150 | |||
| 151 | [xts5] | ||
| 152 | RUN: 1 | ||
| 153 | VERSION: local|* | ||
| 154 | |||
| 155 | [xts5|local|*] | ||
| 156 | AUTOREPLY_XT_FONTPATH_GOOD: [default] | ||
| 157 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5 | ||
| 158 | AUTOREPLY_XVFB_DISPLAY: [default] | ||
| 159 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results | ||
| 160 | AUTOREPLY_XT_FONTPATH: [default] | ||
| 161 | AUTOREPLY_X_CLIENT_HOSTNAME: | ||
| 162 | |||
| 163 | [apache] | ||
| 164 | RUN: 1 | ||
| 165 | VERSION: local|* | ||
| 166 | |||
| 167 | [expect] | ||
| 168 | RUN: 1 | ||
| 169 | VERSION: local|* | ||
| 170 | |||
| 171 | [groff] | ||
| 172 | RUN: 1 | ||
| 173 | VERSION: local|* | ||
| 174 | |||
| 175 | [raptor] | ||
| 176 | RUN: 1 | ||
| 177 | VERSION: local|* | ||
| 178 | |||
| 179 | [rsync] | ||
| 180 | RUN: 1 | ||
| 181 | VERSION: local|* | ||
| 182 | |||
| 183 | [samba] | ||
| 184 | RUN: 1 | ||
| 185 | VERSION: local|* | ||
| 186 | |||
| 187 | [tcl] | ||
| 188 | RUN: 1 | ||
| 189 | VERSION: local|* | ||
| 190 | |||
| 191 | [xpdf] | ||
| 192 | RUN: 1 | ||
| 193 | VERSION: local|* | ||
| 194 | |||
diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb new file mode 100644 index 0000000000..d932c831f6 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | DESCRIPTION = "automate test for lsb" | ||
| 2 | SECTION = "console/utils" | ||
| 3 | LICENSE = "GPLv2" | ||
| 4 | PR = "r0" | ||
| 5 | |||
| 6 | LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0" | ||
| 7 | |||
| 8 | SRC_URI = "file://LSB_Test.sh \ | ||
| 9 | file://packages_list \ | ||
| 10 | file://session \ | ||
| 11 | " | ||
| 12 | RDEPENDS_${PN} = "rpm" | ||
| 13 | |||
| 14 | S=${WORKDIR} | ||
| 15 | |||
| 16 | do_install() { | ||
| 17 | install -d ${D}/usr/bin | ||
| 18 | install -m 0755 ${S}/LSB_Test.sh ${D}/usr/bin | ||
| 19 | install -d ${D}/opt/lsb-test | ||
| 20 | install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list | ||
| 21 | install -m 0644 ${S}/session ${D}/opt/lsb-test/session | ||
| 22 | if [ "${TARGET_ARCH}" == "i586" ];then | ||
| 23 | sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list | ||
| 24 | sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session | ||
| 25 | fi | ||
| 26 | if [ "${TARGET_ARCH}" == "x86_64" ];then | ||
| 27 | sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list | ||
| 28 | sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session | ||
| 29 | fi | ||
| 30 | if [ "${TARGET_ARCH}" == "powerpc" ];then | ||
| 31 | sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list | ||
| 32 | sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session | ||
| 33 | fi | ||
| 34 | } | ||
| 35 | |||
| 36 | FILES_${PN} += "/opt/lsb-test/* \ | ||
| 37 | " | ||
