Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Testing
Commits
32423ccc
Commit
32423ccc
authored
Mar 14, 2013
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alpha-pts: MAC will be used as S/N
parent
78cb5297
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
testing.sh
sw/alpha-pts/testing.sh
+12
-1
No files found.
sw/alpha-pts/testing.sh
View file @
32423ccc
...
@@ -79,12 +79,18 @@ done
...
@@ -79,12 +79,18 @@ done
# Obtain mac address
# Obtain mac address
#MAC=$(ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5 | sed s/://g)
MAC
=
$(
ifconfig |
grep
'eth0'
|
tr
-s
' '
|
cut
-d
' '
-f5
|
sed
s/://g
)
if
[
"
$MAC
"
!=
"02:34:56:78:9A:BC"
]
;
then
SN
=
$(
printf
"%03d"
0x
$(
echo
"
$MAC
"
|
tail
-c
4
))
fi
if
[
${
SN
}
-eq
"0"
]
;
then
if
[
${
SN
}
-eq
"0"
]
;
then
user_echoasking
"num"
"Type the serial number"
"S/N"
user_echoasking
"num"
"Type the serial number"
"S/N"
SN
=
$ans
;
SN
=
$ans
;
fi
fi
echo
"Starting test with WRS SN=
${
SN
}
"
export
logfname
=
"
${
APTS_SWITCH_DIR
}
/logs/output-
${
SN
}
"
export
logfname
=
"
${
APTS_SWITCH_DIR
}
/logs/output-
${
SN
}
"
# Put timestamp in the log
# Put timestamp in the log
...
@@ -100,4 +106,9 @@ run "$num";
...
@@ -100,4 +106,9 @@ run "$num";
cat
$logfname
.log
>>
${
logfname
}
_history.log
cat
$logfname
.log
>>
${
logfname
}
_history.log
echo
""
>>
${
logfname
}
_history.log
echo
""
>>
${
logfname
}
_history.log
chmod
+r
${
APTS_SWITCH_DIR
}
/logs/
*
chmod
+r
${
APTS_SWITCH_DIR
}
/logs/
*
echo
""
echo
"Test for switch
${
SN
}
has terminated"
echo
""
cat
$logfname
.log
exit
0
;
exit
0
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment